Bar close timing and the tick that arrives late
A bar closes at the end of its minute. But a tick that belongs to that minute can arrive after the boundary. Platforms handle it in different ways. Some assign the late tick to the new bar. Some update the old bar retrospectively.
Strategies that wait for the bar close to make a decision may act on a close that changes slightly after the fact. Seen in live trading, the signal fired, and a moment later the bar's close updated and the signal disappeared.
This repainting effect is subtle on one-minute charts and worse on fast tick-based charts. Backtests don't reproduce it, since historical bars are final.
A defensive approach is to delay the decision by a small amount, such as half a second after the bar boundary, to let late ticks arrive. Another is to design the logic around the previous completed bar's close with a margin of tolerance.
Anyone noticing mismatches between live signals and backtest signals should check this effect early.
Has a live signal ever disappeared a moment after the bar closed?
Bar close timing and the tick that arrives late
Bar close timing and the tick that arrives late
It’s Fairman 
Re: Bar close timing and the tick that arrives late
A bar in MT4 or MT5 does not close at an exact moment in the way many traders imagine. The platform starts a new bar when the first tick with a timestamp in the next period arrives. If the last tick of a period arrives at 10:04:59.900 and the next arrives at 10:05:00.300, the old bar is considered closed only when that new tick appears. An EA that checks for a new bar in OnTick will therefore act on the first tick of the new bar, which may come a fraction of a second or several seconds after the nominal close, depending on market activity. In quiet markets, that gap can be noticeable.
It’s Fairman 
-
Amanhasnoname
- Posts: 1506
- Joined: Fri Oct 30, 2026 9:45 am
Re: Bar close timing and the tick that arrives late
Yes, and it caught me out on a live 1-minute strategy that waited for a close above a moving average. Twice in one week the signal printed, I entered, and a moment later the bar's close shifted a fraction and the condition vanished. In the backtest it never happened, so I assumed I had misread the chart.
What I ended up doing was waiting for the first tick of the new bar before evaluating anything, and then using the completed bar only. That added a fraction of a second but removed the phantom signals almost entirely. I also required the close to clear the average by half a pip, which handled the borderline cases.
Comparing my live fills against the backtest signals over two weeks, about one in twenty signals had differed, which was enough to matter at my trade count. My advice is to log every signal with a timestamp so you can compare later, because without that record the effect is almost invisible.
What I ended up doing was waiting for the first tick of the new bar before evaluating anything, and then using the completed bar only. That added a fraction of a second but removed the phantom signals almost entirely. I also required the close to clear the average by half a pip, which handled the borderline cases.
Comparing my live fills against the backtest signals over two weeks, about one in twenty signals had differed, which was enough to matter at my trade count. My advice is to log every signal with a timestamp so you can compare later, because without that record the effect is almost invisible.