Testing Expert Advisor Robustness with Simulated Requotes
Summary
The article presents a simple way to test whether a MetaTrader Expert Advisor depends on trades that may fail in live execution. It notes that the MT4 Strategy Tester builds ticks from one-minute bars and does not model broker requotes, which can make strategies that exploit brief price jumps appear more reliable than they are. A configurable probability is used to make simulated order openings and closings fail during testing. The EA’s normal order functions are wrapped so the simulation applies only in the tester, with pseudo-random values controlling failures.
The author recommends comparing results across different failure probabilities. A strategy whose performance or trade count deteriorates sharply may be sensitive to execution conditions or short-lived price moves. An example using a spike-oriented EA illustrates severe degradation under frequent simulated failures. The article cautions that this is a rough stress test: it models failures as independent random events rather than reproducing broker-specific behavior, latency, or actual quote dynamics. Its probability estimates and conclusions are based on the author’s observations and examples, not a broad empirical study.
Key ideas
- A tester that omits requotes can overstate the viability of strategies trading brief price movements.
- A configurable random failure rate can approximate rejected opens and closes during backtests.
- Comparing results across failure rates reveals how sensitive an Expert Advisor may be to execution failures.
- The model is a simplified stress test and does not reproduce broker-specific execution behavior.
- A strategy’s apparent robustness should be assessed alongside tick-data limitations.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.