1 bar delay in multi-symbol back test using "Open Prices Only" modelling mode

 

Observation / research note

While backtesting a multi-symbol portfolio EA on EURUSD M15, I noticed that entries for GBPUSD, USDCHF, USDCAD, and GBPJPY were systematically about 15 minutes late. EURUSD, EURJPY, and EURAUD entered on time.

This happened in Open Prices Only mode. When I ran each symbol in its own separate backtest, the delay disappeared.

So I tested whether iTime()  returns a stale bar time for off-chart symbols at the exact moment the primary symbol's new-bar OnTick  fires.


Test setup

I used a small EA, BarTimingProbe.mq5 , running on EURUSD M15. On each EURUSD new-bar event, it opened a 50-tick tracking window and polled:

iTime(secondary, PERIOD_M15, 0)

for these secondary symbols: GBPUSD, USDCHF, USDCAD, GBPJPY, EURJPY, EURAUD.

The EA recorded how many ticks it took for the secondary symbol's current bar time to catch up to the EURUSD bar time.

  • 0 = secondary was already current on the same tick
  • N > 0 = secondary caught up after N ticks
  • -1 = secondary did not catch up within 50 ticks

Period: 2025-05-08 to 2026-05-08
Primary: EURUSD M15
Bars tested: 24,751 M15 bars


Results

Symbol Every Tick Real Ticks 1-Min OHLC Open Prices Only
GBPUSD 99.7% 99.7% 99.7% ~100%
USDCHF 99.8% 99.8% 99.8% ~100%
USDCAD 99.7% 99.7% 99.7% ~100%
GBPJPY 99.6% 99.6% 99.6% ~100%
EURJPY 0.6% 0.6% 0.6% 0%
EURAUD 0.7% 0.7% 0.7% 0%

Values show the percentage of M15 bars where the secondary symbol had not yet advanced when the EURUSD new-bar tick fired.


Main finding

In tick-based modes, the non-EUR off-chart symbols lag on about 99.7% of M15 bars, but usually only by 1 tick. So the stale read is very brief.

In Open Prices Only mode, the issue becomes much more serious. MT5 generates only one tick per bar. If the off-chart symbol has not advanced on that tick, there is no second tick inside the same M15 bar to correct it.

That means iTime() , iOpen() , iClose() , etc. for those off-chart symbols only become current on the next M15 bar. In practice, this creates a systematic +1 bar / +15 minute delay on M15.


Practical implication

If a multi-symbol EA runs on EURUSD and reads bar-indexed data from non-EUR off-chart symbols inside the primary symbol's new-bar OnTick , it may read the previous bar's data.

This is especially dangerous in Open Prices Only mode, because the stale state lasts for the whole bar.

  • Single-symbol EA: no issue, because the tested symbol is always the primary symbol.
  • Multi-symbol EA in tick modes: off-chart non-EUR symbols usually lag by 1 tick.
  • Multi-symbol EA in Open Prices Only: off-chart non-EUR symbols can be 1 full bar late.
  • EURJPY and EURAUD were almost unaffected in this test.

Workaround

For production-style testing, the cleanest workaround I found is to run each symbol in its own independent MT5 backtest and then merge the resulting trade records afterwards. When each symbol is tested as the primary symbol, the lag obviously disappears. Although, this could introduce problems with certain risk management and trade methods.


Minimal probe logic

// On each primary EURUSD new-bar event: 
for(int i = 1; i < g_nSym; i++) 
{ 
        datetime bt = iTime(g_sym[i], InpTimeframe, 0); 
        g_secLag[i-1] = (bt == g_winBarTime) ? g_winTick : -1; 
}

The probe produces no trades. It only records timing data.


Summary: In the MT5 Strategy Tester, off-chart symbol bar timestamps may not be synchronized with the primary symbol at the exact new-bar tick. In Open Prices Only mode, this can create a full one-bar delay for multi-symbol EAs.

Test period: 2025-05-08 to 2026-05-08 | Primary: EURUSD M15 | MT5 Strategy Tester



The Fundamentals of Testing in MetaTrader 5
The Fundamentals of Testing in MetaTrader 5
  • 2011.05.18
  • www.mql5.com
What are the differences between the three modes of testing in MetaTrader 5, and what should be particularly looked for? How does the testing of an EA, trading simultaneously on multiple instruments, take place? When and how are the indicator values calculated during testing, and how are the events handled? How to synchronize the bars from different instruments during testing in an "open prices only" mode? This article aims to provide answers to these and many other questions.
Files:
 
This is how open prices mode works in the tester by design. It's not intended for accurate testing of multisymbol robots. You can use M1 OHLC mode or trade by timer. You can find more info about the modes in the book.
MQL5 Book: Generating ticks in tester / Trading automation
MQL5 Book: Generating ticks in tester / Trading automation
  • www.mql5.com
The presence of the OnTick handler in the Expert Advisor is not mandatory for it to be tested in the tester. The Expert Advisor can use one or more...
 
Here is more closely-related chapter for the subject in the book. It explains your observations and suggests what to do (you need to synchronize symbols on your own - by the way, you need it for proper trading online anyway).
MQL5 Book: Multicurrency testing / Trading automation
MQL5 Book: Multicurrency testing / Trading automation
  • www.mql5.com
As you know, the MetaTrader 5 tester allows you to test strategies that trade multiple financial instruments. Purely technically, subject to the...