The close of one bar and the open of the next are not the same price
In theory, a bar closes at the last tick of the minute and the next bar opens at the first tick of the following one. In a liquid market the two are almost identical. In a fast or thin market, they can be pips apart.
That jump is invisible on the chart, which draws the bars side by side. It means that a signal at the close of a bar and an order sent immediately will fill at a price somewhere near the next open, not the close.
Backtests that enter at the close price assume the trade fills at a price that no longer exists. A more realistic test enters at the next bar's open or at the first tick after the signal.
For scalpers, the difference can be large, especially at news and session opens. In some strategies, simply moving entry from the close to the next open reduces the profit factor sharply.
A simple measurement: for each signal, record the close of the signal bar and the first fill price. The average gap, split by time of day, is a direct estimate of the cost hidden in the backtest.
Is the entry price in the backtest taken from the bar close or the next open?
The close of one bar and the open of the next are not the same price
-
Amanhasnoname
- Posts: 2060
- Joined: Fri Oct 30, 2026 9:45 am
Re: The close of one bar and the open of the next are not the same price
I logged this on every signal for six weeks because a backtest I liked was entering at the signal-bar close. Across two hundred and twenty EURUSD signals the average gap between that close and my first fill was about thirty-five hundredths of a pip during the London lunch lull, about one point six pips in the first two minutes of New York, and a bit over four pips in the payroll minute. On a chart the next candle simply sits beside the last one, so none of that jump is obvious.
When I forced every entry to the next bar's open, the profit factor fell from one point three eight to one point zero six. Most of the damage sat in the session-open and news rows. The quiet midday signals barely changed, which had made the close-price version look more robust than it was.
I now treat a close-price entry as a draft and only trust a test that fills at the next open or the first tick after the signal. If that version is only marginally profitable, I assume the live book will not clear costs.
When I forced every entry to the next bar's open, the profit factor fell from one point three eight to one point zero six. Most of the damage sat in the session-open and news rows. The quiet midday signals barely changed, which had made the close-price version look more robust than it was.
I now treat a close-price entry as a draft and only trust a test that fills at the next open or the first tick after the signal. If that version is only marginally profitable, I assume the live book will not clear costs.
-
FXS London Scalper
- Posts: 976
- Joined: Sun Oct 18, 2026 12:25 pm
Re: The close of one bar and the open of the next are not the same price
Gaps between one bar's close and the next bar's open can matter for strategies that enter at the open. Using real tick data shows how large these gaps really are on fast or thin markets, rather than assuming they are zero.
FXS Official Team | London Session Desk