What an Expert Advisor Test Can—and Cannot—Tell You
Running an expert advisor test in MetaTrader's Strategy Tester simulates how an EA's rules would have executed across historical market quotes. Done carefully, backtesting verifies that entries, stops, magic numbers, and lot calculations behave without coding bugs while giving realistic estimates of drawdown, trade frequency, and cost sensitivity.
Done sloppily—with artificial 0-pip spreads, 1-minute interpolated bars, or short date windows—a backtest creates false confidence that collapses on live broker feeds.
Choosing the Right Modeling Quality
| Modeling Mode | Platform | Accuracy & When to Use It |
|---|---|---|
| Every tick based on real ticks | MT5 | Highest built-in fidelity using actual historical Bid/Ask ticks and real variable spreads from your broker. Required for scalpers and tight-SL EAs. |
| Every tick (simulated) | MT4 / MT5 | Generates synthetic ticks from M1 OHLC bars. Suitable for rough logic checks, though MT4 built-in history maxes out at 90% unless third-party tick data is imported for 99.9% modeling. |
| 1 Minute OHLC | MT5 | Evaluates four price points per minute bar; much faster for initial parameter screening on swing strategies. |
| Open prices only | MT4 / MT5 | Evaluates only on new bar opens; useful strictly for EAs explicitly coded to check signals only at candle close. |
Step-by-Step Backtest Setup in MetaTrader
- Open Strategy Tester (
Ctrl+R): Select your Expert Advisor, exact target symbol, and chart timeframe. - Choose Multi-Year History: Test at least 3–5 years spanning quiet consolidating periods, sharp central-bank tightening cycles, and volatile news shocks.
- Apply Realistic Broker Conditions: Match your planned initial deposit, account leverage, and currency. On MT5, enable realistic execution delay (e.g., 20–100ms random or fixed delay) to simulate VPS/broker latency.
- Run Visual Mode First (Short Window): Watch 1–2 weeks in Visual Mode to confirm stops, trailing stops, and spread filters behave exactly as intended.
- Run the Full Simulation and Export the Report: Inspect both the Equity Graph (blue/green balance vs floating equity) and the detailed statistics tab.
Reading the Report Beyond Net Profit
- Equity Drawdown Relative & Maximal: The single most critical safety number—shows how close the strategy came to margin stress during losing streaks.
- Profit Factor & Expected Payoff: Check whether average profit per trade comfortably exceeds typical spread + commission costs.
- Consecutive Losses & Z-Score: Tells you how many losing trades in a row you must emotionally and financially withstand without pausing the EA prematurely.
Avoid Overfitting With Out-of-Sample & Forward Validation
Never tune EA settings across the entire dataset until the equity curve looks artificially smooth. Split your history into an In-Sample tuning window (for example, 2020–2023) and a locked Out-of-Sample test window (2024–2026) that you test only once at the end. Follow any passing backtest with a live-spread demo forward test before allocating real funds.
ACTION CHECKLIST
- Open Strategy Tester: Press Ctrl+R in MT4 or MT5 and pick the Expert Advisor, exact symbol, and intended timeframe.
- Select high-fidelity tick modeling: Choose Every tick based on real ticks in MT5 or 99%-quality variable-spread tick data in MT4.
- Match realistic deposit, leverage, and latency: Set account deposit, leverage, commissions, and simulated execution delay to mirror live trading conditions.
- Spot-check logic in Visual Mode: Run a short Visual Mode window to verify stops, trailing logic, and spread checks execute cleanly.
- Analyze full-period metrics and equity curve: Inspect equity drawdown, profit factor, recovery factor, and consecutive losses across multi-year history.
- Validate on out-of-sample data and demo: Confirm results hold on unseen out-of-sample dates and follow up with a live-feed demo test.