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 last tick before the bar closes
-
FXS London Scalper
- Posts: 976
- Joined: Sun Oct 18, 2026 12:25 pm
Re: The last tick before the bar closes
The processing gap is small on most days and large exactly at 08:00 London, when ticks pile up. A system that trades the M1 close at the open is often entering a few ticks into the next bar. Logging the time between bar close and order send for a week shows how big that gap really is.
FXS Official Team | London Session Desk
-
Amanhasnoname
- Posts: 2060
- Joined: Fri Oct 30, 2026 9:45 am
Re: The last tick before the bar closes
I ran into exactly this with a simple M1 breakout system on GBPJPY a while ago. On paper it was decent, but live it was bleeding a little on almost every trade and I could not work out why. When I finally logged the timestamps, the order was leaving my terminal anywhere between a quarter and two thirds of a second after the bar closed, and on the busy London open it was sometimes over a second because the platform was choking on incoming ticks.
I went back and re-ran the test with a random delay added, and the profit factor dropped from a little over one and a half to barely above one. Nothing else changed. That told me the edge was mostly living in the first few ticks of the new bar, which I was never going to get.
What helped in the end was moving the logic onto a VPS close to the broker and switching to a limit order a fraction away from the trigger instead of a market order at the open. Fewer fills, but the ones I get look much more like the backtest.
I went back and re-ran the test with a random delay added, and the profit factor dropped from a little over one and a half to barely above one. Nothing else changed. That told me the edge was mostly living in the first few ticks of the new bar, which I was never going to get.
What helped in the end was moving the logic onto a VPS close to the broker and switching to a limit order a fraction away from the trigger instead of a market order at the open. Fewer fills, but the ones I get look much more like the backtest.