The last tick before the bar closes
Posted: Sun Nov 01, 2026 12:16 am
Many systems decide on closed bars: wait for the bar to finish, check conditions, trade at the next open. It's tidy. It's also less tidy than it sounds.
The "close" of a one-minute bar is the last tick before the minute ends. By the time the platform has processed it, drawn the new bar, run the indicator, and sent an order, the next bar has already opened. The order fills at that open, or a tick or two later. In fast markets, the difference is real money.
Backtests assume the entry occurs at the next bar's open price, exactly. Live, there's a delay and a price movement during it. A signal that fires at 10:00:00.000 gets filled at 10:00:00.350 at a price that has moved.
Another quirk: the last tick of the bar is not always the "official" close. Different brokers or platforms may include or exclude ticks that arrive right on the boundary, so bars can differ slightly in close value.
Allowing for a realistic delay, say 200 to 500 milliseconds, in the backtest shows how sensitive the strategy is to it.
There are choices that soften the problem. Acting on the current bar's developing values, with a rule like "enter if the price is above X at 30 seconds into the bar," avoids waiting for the close but introduces its own look-ahead risks if the test isn't carefully built.
Tick-based testing is more faithful. The test engine moves tick by tick, and the strategy decides on each tick, with a simulated latency before the order takes effect.
In live trading, the order arrives after a delay, and the price at that moment is what counts. Modeling the delay as a random number between 100 and 600 milliseconds, with a heavier tail in busy periods, is a closer match to reality than a fixed instant fill.
A strategy that falls apart when the delay is changed from zero to half a second is fragile, and the live account is likely to show it.
How much does a half-second delay change the results of a bar-close strategy?
The "close" of a one-minute bar is the last tick before the minute ends. By the time the platform has processed it, drawn the new bar, run the indicator, and sent an order, the next bar has already opened. The order fills at that open, or a tick or two later. In fast markets, the difference is real money.
Backtests assume the entry occurs at the next bar's open price, exactly. Live, there's a delay and a price movement during it. A signal that fires at 10:00:00.000 gets filled at 10:00:00.350 at a price that has moved.
Another quirk: the last tick of the bar is not always the "official" close. Different brokers or platforms may include or exclude ticks that arrive right on the boundary, so bars can differ slightly in close value.
Allowing for a realistic delay, say 200 to 500 milliseconds, in the backtest shows how sensitive the strategy is to it.
There are choices that soften the problem. Acting on the current bar's developing values, with a rule like "enter if the price is above X at 30 seconds into the bar," avoids waiting for the close but introduces its own look-ahead risks if the test isn't carefully built.
Tick-based testing is more faithful. The test engine moves tick by tick, and the strategy decides on each tick, with a simulated latency before the order takes effect.
In live trading, the order arrives after a delay, and the price at that moment is what counts. Modeling the delay as a random number between 100 and 600 milliseconds, with a heavier tail in busy periods, is a closer match to reality than a fixed instant fill.
A strategy that falls apart when the delay is changed from zero to half a second is fragile, and the live account is likely to show it.
How much does a half-second delay change the results of a bar-close strategy?