Understanding Execution Delay Settings in MT5
The MetaTrader 5 Strategy Tester includes an Execution section that allows users to emulate network delays between sending a trade request and its execution. According to the documentation, a certain time delay is inserted between placing a trade request and its execution, which allows the price to change and enables evaluation of how trade processing speed affects results. This feature is available only for trades performed by an Expert Advisor, such as placing orders or modifying stop levels, and does not apply to pending order execution since real execution occurs on the server without network delay.
The tester offers three distinct delay modes. The No Delay mode executes all orders at requested prices without requotes, serving as an ideal benchmark. The Random Delay mode generates delays by selecting a random number from 0 to 9 seconds, with a 90% probability of a 0–8 second delay and a 10% probability of a 9–18 second delay when the initial number is 9. The Fixed Delay mode allows selection of predefined values or custom settings, including the ability to measure and input the actual ping to the trade server for realistic simulation.
Sources: MetaTrader 5 documentation: testing MetaTrader 5 documentation: features
Fixed Delay Mode and Server Ping Measurement
The Fixed Delay mode provides the most precise control over execution timing by allowing users to set a specific delay value. The platform measures the ping to the trade server and permits using that measured value as the delay setting, enabling testing under conditions as close to real ones as possible. This approach ensures that the simulated delay reflects actual network latency between the user's computer and the broker's server, which can vary based on geographic location, internet connection quality, and server load.
Using the measured ping value helps identify whether an Expert Advisor's performance is sensitive to realistic execution speeds. However, it is important to note that even with this setting, the tester cannot fully replicate live market conditions because it operates on historical data. The delay is applied uniformly to all trade requests during the test, whereas real network conditions fluctuate dynamically based on packet loss, routing changes, and server processing times that are not modeled in the tester.
Sources: MetaTrader 5 documentation: testing
Random Delay Mode and Probability Distribution
The Random Delay mode introduces stochastic variability to simulate unpredictable network conditions. The delay generation follows a specific algorithm: a number from 0 to 9 is selected randomly to determine the number of seconds for the delay. If the selected number equals 9, another number from the same range is randomly chosen and added to the first, resulting in a combined delay of 9 to 18 seconds. This creates a probability distribution where 90% of delays fall between 0 and 8 seconds, while 10% extend from 9 to 18 seconds.
This probabilistic approach mimics the occasional longer delays that occur in real trading environments due to network congestion or server processing bottlenecks. However, the distribution is simplified and does not account for bursty traffic patterns, time-of-day variations, or the correlation between successive delays that often characterize actual network behavior. The mode provides a middle ground between idealized testing and overly rigid fixed delays, but still represents a simplified model of network reality.
Sources: MetaTrader 5 documentation: testing
Requote Handling and Execution Price Deviation
In the instant execution mode, users can additionally check the Expert Advisor's response to a requote from the trade server. A requote occurs when the difference between the requested price and the execution price exceeds the deviation value specified in the order. When this happens, the Expert Advisor receives a requote notification, allowing it to decide whether to accept the new price, modify the order, or cancel the request. This feature helps evaluate how the EA handles adverse price movements during the execution window.
The documentation explicitly states that delays work only for trades performed by an EA, including placing orders and changing stop levels. For pending orders, delays are applied only to order placing, not to order execution, because in real conditions execution occurs on the server without a network delay. This distinction is critical for understanding the boundaries of the simulation, as it means certain aspects of live trading execution are not modeled, particularly the server-side processing time and the actual order matching engine behavior.
Sources: MetaTrader 5 documentation: testing MetaTrader 5 documentation: features
Limits of Test Realism and Forward Testing
While the execution delay settings improve test realism, significant limitations remain. The tester operates on historical data and cannot account for changing market conditions, liquidity variations, or the impact of other traders' actions that influence real execution prices. The spread is taken from historical data and not modeled dynamically, which means slippage during periods of high volatility may be underestimated. Additionally, the tester does not simulate the actual order book dynamics or the broker's internal routing decisions that affect execution quality.
Forward testing helps address some of these limitations by dividing the testing period into backtesting and forward testing segments. The forward portion uses parameters optimized on earlier data to validate performance on unseen data, reducing the risk of curve-fitting. However, even forward testing cannot capture the full complexity of live trading. The documentation emphasizes that testing results should be interpreted cautiously, as past performance does not guarantee future results, and the simulated environment may not reflect actual market microstructure or the broker's specific execution policies.
Sources: MetaTrader 5 documentation: testing MetaTrader 5 documentation: features
Tick Generation Modes and Their Impact on Execution Simulation
The choice of tick generation mode significantly affects how execution delays interact with price data. The Every tick mode simulates all ticks and provides the most accurate representation but is the slowest. Every tick based on real ticks uses actual broker tick data without simulation, offering conditions close to real ones but requiring large data downloads. The 1 minute OHLC mode emulates only four prices per minute bar, while the Open prices only mode uses only open prices for testing.
In less accurate modes like Open prices only and 1 minute OHLC, pending orders and stop orders are executed at the prices specified in the orders rather than at market prices. This provides more accurate testing results in these constrained modes because intermediate ticks are not generated, and the difference between requested and current prices can be significant. However, this also means that the execution delay simulation operates within a simplified price framework that may not reflect the continuous price movements that occur during real execution windows.
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.