BACKTESTING · FILLS

Bar-Close Signals vs Next-Bar Fills: Why Backtest Returns Change

If a signal appears when a bar closes, the trade cannot fill at that same close. Moving the fill one bar later changes returns, sometimes completely.

Short answer

A signal computed from a bar's close is known only after the bar closes, so the earliest realistic fill is the next bar's open, plus slippage. Backtests that fill at the signal bar's close capture a price nobody could trade at, which flatters strategies that enter after strong closes. Fill at the next bar open (or use a limit-order model with realistic fill rules), add fees and slippage, and compare returns under both assumptions to see how sensitive the strategy is.

The timing problem

Signal vs fillSignal vs fill: BAR N: Close 60,000 → signal; GAP: Close is in the past; BAR N+1 OPEN: 60,080: earliest fill; + SLIPPAGE: Fill 60,110.BAR NClose 60,000 → signalGAPClose is in the pastBAR N+1 OPEN60,080: earliest fill+ SLIPPAGEFill 60,110
The 110-point difference is a cost the same-bar backtest ignored. Original ChartsPod editorial graphic.

TradingView's strategy documentation describes how order fills are simulated and how assumptions about bar contents affect results.

Impact on returns

AssumptionTradesAvg cost vs closeReturn (illustrative)
Fill at signal close3000+35%
Next open3006 bps+17%
Next open + 5 bps slippage30011 bps+2%
Illustrative return by fill model (%)Illustrative return by fill model (%): Signal close +35 %; Next open +17 %; Next open + slippage +2 %.ILLUSTRATIVE RETURN BY FILL MODEL (%)Signal close+35 %Next open+17 %Next open + slippage+2 %
Momentum entries are hit hardest. Original ChartsPod editorial graphic.

Which strategies suffer most

Breakout and momentum entries after strong closes suffer because the next open often gaps in the signal's direction. Mean-reversion entries can sometimes benefit. Either way, the backtest must use the realistic fill to be trusted.

Fill model checklistFill model checklist: Signal time = bar close; Fill time = next open or later; Slippage added; Fees per side added; Sensitivity: compare both models.FILL MODEL CHECKLISTSignal time = bar closeFill time = next open or laterSlippage addedFees per side addedSensitivity: compare both models
If results flip between models, the edge is fragile. Original ChartsPod editorial graphic.

Limit orders need their own rules

A limit order at a price inside the next bar's range is not guaranteed to fill: price may touch the level without trading enough volume there. Conservative backtests require price to trade through the limit (not just touch it) before counting a fill. Without that rule, limit-order strategies look better than they are, because they appear to catch every reversal at the exact level.

Conclusion

Fill at the next available price after the signal, add costs, and test how sensitive returns are to the fill model.

Related: How to Backtest Crypto Strategies Without Lookahead Bias, EMA Crossover Backtest in Crypto: Fees, Slippage and Break-Even Costs.

Backtest with next-bar fills in ChartsPod.

Open the ChartsPod terminal

Put Bar-Close Signals vs Next-Bar Fills next to price, flow and positioning in one workspace.

Open a ChartsPod workspace

Questions readers ask

Why can't I fill at the signal close?

The signal is only known after the close has passed.

What is a realistic fill?

The next bar's open plus slippage for market orders.

Do limit orders avoid this?

They change it; model whether price actually reached and traded through the limit.

Sources and methodology

Backtesting principles follow TradingView's Pine Script documentation on strategies, repainting and non-standard charts, and ChartsPod's strategies-and-backtests guide summary, as read on 17 October 2026. All numbers are illustrative and do not describe a real strategy's performance.

  1. TradingView Pine Script: Strategies — simulated fills and assumptions.
  2. TradingView Pine Script: Repainting — live vs historical calculation.

This article explains research tools and workflows. It is not financial advice, does not recommend buying or selling any asset and does not predict prices. Crypto derivatives carry a risk of rapid and total loss of margin.

CHARTSPOD EDITORIAL EDITION · RESEARCH AND EDUCATION ONLY · NOT FINANCIAL ADVICE.