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
TradingView's strategy documentation describes how order fills are simulated and how assumptions about bar contents affect results.
Impact on returns
| Assumption | Trades | Avg cost vs close | Return (illustrative) |
|---|---|---|---|
| Fill at signal close | 300 | 0 | +35% |
| Next open | 300 | 6 bps | +17% |
| Next open + 5 bps slippage | 300 | 11 bps | +2% |
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.
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 terminalPut Bar-Close Signals vs Next-Bar Fills next to price, flow and positioning in one workspace.
Open a ChartsPod workspaceQuestions 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.
- TradingView Pine Script: Strategies — simulated fills and assumptions.
- 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.