Understanding Bar Synchronization in Multi-Currency Testing
The MT5 Strategy Tester allows backtesting of multi-currency Expert Advisors that trade two or more symbols. Testing such strategies requires the tester to generate ticks, calculate indicators, compute margin, and synchronize tick sequences across all trading instruments. In the Open Prices Only mode, the tester generates a tick sequence for each symbol according to the selected mode, but it does not enforce temporal alignment between them. A new bar for each symbol opens independently, regardless of whether another symbol has started a new bar, mirroring real-time market asynchrony.
The documentation notes that this asynchrony does not cause issues in Every Tick or 1 Minute OHLC modes because enough ticks per bar allow the EA to wait for synchronization. However, in Open Prices Only mode, the EA is invoked only once per bar, at the open time of the primary symbol. There is no guarantee that secondary symbols have opened a new bar at that exact moment, which creates a challenge for strategies relying on simultaneous data across instruments.
Sources: MetaTrader 5 documentation: features MetaTrader 5 documentation: testing
Tick Generation and Order Execution in Open Prices Only Mode
In the Open Prices Only mode, the tester emulates OHLC prices but restricts the EA's access to the open price for decision-making. The EA receives exactly one tick per bar, corresponding to the bar open time, and no intermediate ticks are generated. This reduces computational load and speeds up backtesting but limits the EA's ability to react to intrabar price movements. The absence of intermediate ticks means the EA cannot observe high, low, or close prices during the bar interval.
Pending orders, including stop-loss and take-profit levels, are executed at the prices specified in the orders rather than at market prices. This execution model applies to both Open Prices Only and 1 Minute OHLC modes and ensures consistency across symbols. However, it does not simulate slippage or requotes that occur in live trading, which may affect the realism of backtest results for strategies sensitive to execution quality.
Sources: MetaTrader 5 documentation: features MetaTrader 5 documentation: testing
Asynchronous Bar Openings Across Symbols
When testing a multi-currency EA in Open Prices Only mode, the tester generates an independent tick sequence for each symbol based on its own historical data. A new bar for each symbol is opened regardless of how the bar has opened on another symbol. This means that while the EA is triggered at the open of the main symbol's bar, secondary symbols may still be within their previous bar. The tester does not enforce temporal alignment across instruments, allowing each symbol's bar progression to follow its own timeline.
The documentation explicitly states that in Open Prices Only mode, the EA is called on one tick corresponding to the bar open time of the primary symbol. There is no guarantee that a new candlestick has opened on other symbols used in the EA. This situation may occur frequently during multi-currency testing and reflects the authentic behavior of real-time quotes, but it introduces complexity for strategies that depend on synchronized bar events.
Sources: MetaTrader 5 documentation: features MetaTrader 5 documentation: testing
Impact on Strategy Logic and Backtest Accuracy
The asynchronous nature of bar openings in Open Prices Only mode affects the accuracy of backtests for multi-currency strategies. Since the EA is only called on one tick per bar, it may attempt to read data from secondary symbols that have not yet updated. This can lead to calculations based on outdated or incomplete information, potentially distorting performance metrics. The tester does not provide a mechanism for the EA to wait for synchronization, unlike in modes with multiple ticks per bar.
Strategies that rely on inter-market relationships, such as arbitrage or correlation-based entries, are particularly sensitive to this asynchrony. The documentation warns that synchronization of bars across trading instruments is required for multi-currency strategies in this mode, yet the tester does not automatically provide it. Developers must be aware that backtest results in Open Prices Only mode may not fully reflect live trading conditions without additional validation in more accurate modes.
Sources: MetaTrader 5 documentation: features MetaTrader 5 documentation: testing
Documented Limitations and Testing Recommendations
The MT5 documentation outlines several limitations when using Open Prices Only mode for multi-currency testing. First, the tester does not synchronize bar openings across symbols, so the EA may encounter situations where data from secondary symbols is not aligned with the primary symbol's bar open. Second, order execution is restricted to the prices specified in orders, eliminating the simulation of market slippage and requotes. Third, the mode does not generate intrabar ticks, meaning indicators calculated on secondary symbols may not reflect real-time market dynamics.
Before testing a multi-currency strategy, it is recommended to download all necessary historical data to the trading platform to avoid delays associated with data retrieval. Additionally, enabling the required symbols in the Market Watch before starting the test ensures that the tester can automatically download history for all accessed instruments. If insufficient history is available, the tester will log an automatic date shift in the journal, providing transparency into data limitations that may affect bar alignment and test validity.
Sources: MetaTrader 5 documentation: features MetaTrader 5 documentation: testing
AI-assisted educational article. Automated checks reviewed source support and quality; they do not guarantee accuracy. This is not investment advice. Leveraged and automated trading involves substantial risk of loss.
Sources & further reading
MetaTrader 5 documentation: testingMetaTrader 5 documentation: featuresEducational content only. This article is not investment advice. Automated and leveraged trading involves substantial risk of loss.