Overview of Tick Generation Modes
The MetaTrader 5 Strategy Tester offers four distinct tick generation modes that determine how price data is simulated during backtesting. Each mode represents a different trade-off between accuracy and computational speed. Selecting the appropriate mode is fundamental because it directly influences the realism of price movements, the triggering of pending orders, and ultimately the reliability of the test results. The tester documentation explicitly lists these modes as Every tick, Every tick based on real ticks, 1 minute OHLC, and Open prices only, with an additional Math calculations mode that bypasses price data entirely.
The choice of mode dictates how frequently the Expert Advisor's OnTick() function is called and what price information is available at each event. In modes that generate fewer ticks, such as Open prices only, the EA is only invoked at the open of each bar, which can mask intrabar price fluctuations and lead to overly optimistic results. Conversely, the Every tick mode simulates every recorded price change, providing the highest fidelity but requiring significantly more processing power and time to complete the test.
Sources: MetaTrader 5 documentation: testing MetaTrader 5 documentation: features
Every Tick and Real Ticks Modes
The Every tick mode is described as the most accurate but slowest simulation method. In this mode, the tester replays every single historical tick recorded for the selected symbol, meaning that the EA receives an OnTick() event for each individual price update. This allows the strategy to react to rapid price movements, slippage scenarios, and spread variations exactly as they occurred in the past. Because it processes the maximum amount of data, this mode is resource-intensive and is recommended for final validation before deploying a strategy live.
The Every tick based on real ticks mode provides conditions close to real trading without performing synthetic simulation. Instead of generating artificial ticks, this mode utilizes actual tick data accumulated by brokers. A key practical consideration is the download time; because tick files can be very large, the first run in this mode may take a considerable amount of time to fetch the necessary data from the broker's server. Once downloaded, subsequent tests run faster, but users must ensure they have sufficient storage and a stable connection to retrieve these extensive datasets.
Sources: MetaTrader 5 documentation: testing MetaTrader 5 documentation: features
OHLC and Open Prices Only Modes
The 1 minute OHLC mode simplifies the testing process by emulating only four prices for each minute bar: Open, High, Low, and Close. In this environment, the EA is not triggered by every tiny price fluctuation but rather operates on a per-minute basis. This mode is useful for strategies that do not rely on high-frequency intrabar entries or exits, as it significantly reduces the computational load while still providing a general overview of the strategy's performance across the selected timeframe.
The Open prices only mode goes a step further in simplification by modeling OHLC prices but utilizing exclusively the Open price for testing and optimization. In this specific configuration, pending orders, Stop Loss, and Take Profit levels are executed precisely at the prices specified in the orders rather than at simulated market prices. This can lead to more favorable execution prices compared to real-world scenarios where slippage occurs, making it a mode that often yields optimistic results if not cross-verified with more accurate settings.
Sources: MetaTrader 5 documentation: testing MetaTrader 5 documentation: features
Math Calculations and Performance Trade-offs
The Math calculations mode is a specialized option designed for rapid parameter evaluation where historical price data is entirely ignored. In this mode, the tester does not download symbol history or generate ticks; instead, it only calls the OnInit(), OnTester(), and OnDeinit() functions. This allows developers to perform mathematical calculations or run optimization loops quickly, focusing purely on code logic and parameter combinations without the overhead of price simulation. It is explicitly intended for quick, rough estimations and must be followed by accurate testing.
Using less accurate modes like Open prices only or 1 minute OHLC introduces specific risks regarding order execution. The documentation notes that because intermediate ticks are not generated in these modes, the difference between a requested order price and the current bar price can be substantial. While executing orders at the requested price provides cleaner test results, it does not account for the realistic slippage and requotes that occur during volatile market conditions in live trading.
Sources: MetaTrader 5 documentation: testing MetaTrader 5 documentation: features
Impact of Testing Assumptions on Results
The reliability of any backtesting result is directly dependent on the chosen tick generation mode. When a strategy is tested using the Open prices only mode, it may show a high win rate and minimal slippage because the simulation assumes perfect execution at the bar's opening price. However, when the same strategy is evaluated under the Every tick mode, the inclusion of actual price volatility and spread dynamics often reveals hidden vulnerabilities, such as frequent stop-loss hits during news events or gaps between bars.
Therefore, the documented sequence of actions for robust strategy validation requires starting with faster, less accurate modes for initial parameter screening and concluding with the Every tick or Real Ticks modes for final verification. By understanding how each mode simulates price action, traders can prevent overfitting to unrealistic conditions and ensure that the strategy's documented controls perform as expected under live market constraints.
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.