How the Tester Acquires Historical Data
The Strategy Tester automatically downloads price history for every symbol referenced by an Expert Advisor during the first call to that symbol, pulling data from the trading platform rather than directly from the trade server. Only missing bars are fetched on subsequent runs, which keeps update times short. For multi-currency strategies, enabling the required instruments in the Market Watch before launch ensures the tester can locate and synchronize their histories without interrupting the simulation.
Before starting a test, the platform also requests extra bars that precede the chosen interval so that at least one hundred bars are available for indicator warm-up. If the requested history is shorter than this threshold, the start date shifts forward automatically and a message is logged in the Journal. Opening the relevant charts and scrolling back to the earliest available data in advance helps avoid these automatic adjustments and guarantees a stable testing window.
Sources: MetaTrader 5 documentation: testing MetaTrader 5 documentation: features
Cross-Rate Requirements and Deposit Currency
Profit and margin calculations are converted into the account’s deposit currency, so the tester needs cross-rate histories for every pair involved. Only symbols with Forex or Forex No Leverage calculation types are accepted as conversion bridges. When a strategy trades EURCHF while the deposit currency is USD, the agent transparently requests EURUSD and USDCHF data before the first trade, even though the code never references those pairs explicitly.
To prevent pauses during testing, pre-load the cross-rate charts in the platform by opening them and scrolling to the beginning of history. The tester then transfers the required series to the agent in compressed form, eliminating the need to download them from the server mid-run. This preparation is especially important for visual mode, where any delay in data arrival can break the real-time playback of trades.
Sources: MetaTrader 5 documentation: testing MetaTrader 5 documentation: features
Minimum Bar Requirements per Timeframe
Each timeframe has a documented minimum number of bars that the tester insists on having before it will begin. For intervals from one minute up to daily charts, at least one year of data is fetched; the weekly timeframe requires one hundred bars, roughly two years; the monthly timeframe demands ninety-six months, about eight years. These thresholds ensure indicators have enough samples to produce stable values at the start of the test.
If the available history cannot supply the required bar count, the tester shifts the start date forward until the condition is met and records the adjustment in the Journal. Traders can avoid this behavior by manually verifying that the symbol’s history extends far enough back. The rule applies uniformly to every symbol in a multi-currency test, so all instruments must satisfy their respective minimums before the simulation begins.
Sources: MetaTrader 5 documentation: features MetaTrader 5 documentation: testing
Synchronizing Bars in Open Prices Only Mode
In Open Prices Only mode, the Expert Advisor receives only one tick per bar, the open price, which means bar synchronization across instruments becomes critical. Because each symbol opens a new bar independently, it is possible for one instrument to have started a fresh bar while another has not, creating a situation where the EA is triggered without a matching update on the second symbol. The tester does not artificially delay the call; it simply reflects the asynchronous nature of historical data.
This behavior is harmless in Every Tick or One Minute OHLC modes, where enough intermediate ticks allow the EA to wait for alignment, but in Open Prices Only it can lead to missed signals if the code assumes all symbols advance together. Developers should therefore test multi-currency strategies in the more granular modes first, then switch to Open Prices Only only after confirming that the logic tolerates staggered bar openings.
Sources: MetaTrader 5 documentation: features MetaTrader 5 documentation: testing
Practical Steps to Pre-Load Data for Reliable Testing
Begin by opening the main chart and every secondary symbol used by the EA, then scroll each chart back to the earliest available bar; this action stores the full history locally and lets the tester skip server downloads during the run. Next, verify that the deposit currency’s cross-rate pairs are also present, because missing series will trigger on-the-fly requests that can stall optimization loops. Finally, confirm that each symbol meets the minimum bar requirement for the chosen timeframe, correcting any shortfalls before launching.
After these preparations, save the testing settings to an ini file so that the exact configuration can be restored quickly. When using remote agents, remember that ticks are generated locally and never transmitted, so pre-loading remains essential only on the machine running the platform. Re-testing with the same parameters will reuse the cached history, making subsequent runs faster and fully reproducible.
Sources: MetaTrader 5 documentation: testing MetaTrader 5 documentation: features
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.