MT4 Strategy Tester Guide: Backtest Any EA in 5 Minutes

A backtest is the cheapest reality check in algo trading. Before you let an EA risk a single dollar, the Strategy Tester tells you whether it would have survived the last five years of market history. Most traders skip backtesting — and most traders lose money.

This guide walks you through the entire MT4 Strategy Tester from first launch to reading the final report. About 5 minutes to read; you’ll spend more time interpreting your first results than configuring the test.


Prerequisites

You need:


How to Run a Backtest on MT4: 6-Step Guide

Step 1 — Open the Strategy Tester

Press Ctrl+R or go to View > Strategy Tester in the top menu. A panel docks at the bottom of MT4 with backtest settings.

The panel has multiple tabs across the top — Settings, Inputs, Optimization Inputs, Results, Graph, Report, Journal. We’ll start with Settings.

Step 2 — Configure Backtest Parameters

In the Settings tab, fill in:

Field What to set
Expert Advisor Pick the EA you installed from the dropdown
Symbol The pair to test (e.g. EURUSD) — match the EA’s intended instrument
Period Timeframe (M1, M5, H1, etc.) — match the EA’s intended timeframe
Model Modelling quality (see Step 3)
Use date Set Start and End dates — at least 1 year, ideally 3-5 years
Spread Use “Current” spread for realistic results, or fixed pips for stress tests
Visual mode ON to watch trades on chart; OFF for fastest results

Click Inputs to set the EA’s parameters (lot size, MA periods, etc.). Defaults are usually fine for a first run.

MT4 Strategy Tester panel with EA selection, symbol, timeframe, and date range fields

Step 3 — Choose Modelling Quality

The Model dropdown controls how MT4 simulates price ticks during the backtest. Three levels:

Model Speed Accuracy When to use
Every tick Slowest Highest (99%+) Final evaluation — production-grade EA
Control points Medium Medium (~70%) Mid-development testing
Open prices only Fastest Low (~25%) Quick sanity check, only for EAs that trade on bar open

For any EA that uses intra-bar logic (trailing stops, stop entries, breakouts), always use Every Tick. Open Prices Only is fine for EAs that strictly trade at bar close.

Modelling quality below 90% is typically meaningless for serious strategy validation. If you see “Modelling quality: 25%” in the report after a 5-year run, you have a history data problem (next section) — fix that before judging the EA.

MT4 Strategy Tester showing the modelling quality dropdown with Every Tick selected

Step 4 — Get Quality History Data

MT4’s Strategy Tester is only as accurate as its history data. By default, MT4 only downloads ~512 bars per timeframe — far too few for serious backtesting.

To get the full history:

  1. Click Tools > Options > Charts in the top menu.
  2. Set Max bars in history to 9999999 (the maximum).
  3. Set Max bars in chart to 9999999.
  4. Click OK.
  5. Click Tools > History Center (or press F2).
  6. Pick your symbol (e.g. EURUSD).
  7. Double-click each timeframe you need (M1, M5, M15, H1, H4, D1).
  8. Click Download for each. Wait — M1 history can take 2-5 minutes per pair.

Why M1 specifically? MT4 Strategy Tester at 99% modelling quality builds higher timeframes by interpolating from M1 data. If M1 is missing, your 99% becomes 25% silently.

MT4 History Center dialog with M1 download button highlighted for tick data accuracyFor tick-level accuracy beyond what the broker provides, third-party services like Tickstory or Tick Data Suite import real tick history — they unlock 99.9% modelling and reduce backtest distortion.

Step 5 — Click Start and Wait

Click Start at the bottom-right of the Strategy Tester panel. A progress bar fills as MT4 simulates ticks.

Speed depends on:

  • Modelling quality (Every Tick is 10-50× slower than Open Prices)
  • Date range (5 years takes 10× longer than 6 months)
  • EA complexity (heavy indicator EAs slow the test)
  • CPU cores (MT4 only uses ONE core — buy a higher single-thread CPU for faster tests)

Typical timing benchmarks:
6 months M5, Every Tick: 1-3 minutes
3 years H1, Every Tick: 3-8 minutes
5 years M5, Every Tick: 15-45 minutes

Use Visual Mode (checkbox below the Start button) only for the first 30 seconds to confirm the EA is opening trades correctly — then disable for full speed.

Step 6 — Read the Backtest Report

When the test completes, click the Report tab. The metrics that matter:

Metric What it measures Healthy benchmark
Profit factor Gross profit / gross loss > 1.5 (1.0 = breakeven)
Total net profit Final P&L over the test period Positive (obvious!)
Maximum drawdown Largest equity dip during the test < 30% of peak equity
Total trades Sample size — more = more reliable > 100 trades
Win rate % winning trades Depends on R:R; not a standalone metric
Modelling quality Tick simulation accuracy > 90%
Mismatched chart errors History data gaps Should be 0
Expected payoff Average $ per trade > 0
Sharpe ratio Return relative to volatility > 1.0

A profit factor below 1.2 means the EA is barely profitable — small slippage in live trading will turn it negative. A drawdown above 50% means you’d quit (or get margin-called) before the EA recovers.

MT4 Strategy Tester results tab showing profit, drawdown, profit factor, and trade count

Optimization (Tuning EA Parameters)

The Strategy Tester can run hundreds of backtests across different parameter combinations and rank them by profit factor.

  1. Check Optimization at the top of the Settings tab.
  2. Switch to the Inputs tab. Each parameter has Start, Step, and Stop fields. Tick the parameters you want to vary.
  3. Click Start. MT4 runs every combination.
  4. Switch to Optimization Results when complete — sort by profit factor or net profit.

Warning: optimization is the easiest way to over-fit. A “perfect” parameter set tuned on 5 years of past data often fails miserably on the next 6 months of live data. Always reserve out-of-sample data (e.g. 80% in-sample, 20% out-of-sample) and confirm the optimized EA still profits on the holdout period.


Common Backtest Pitfalls

  • Modelling quality below 90%: download M1 history (Step 4) before testing.
  • Spread set artificially low: Default spread of 1 pip on EUR/USD looks rosy but breaks during news. Use real-historical spreads or stress-test at 3-4× current spread.
  • Survivorship bias: EAs marketed online were already filtered for past performance. Forward-test on demo for at least 4 weeks before going live.
  • Optimization over-fit: beating in-sample by 200% but losing on out-of-sample is a red flag — the EA learned the noise, not the signal.
  • No commission accounted for: check your broker’s commission per lot and add it to the Strategy Tester via the Symbol’s properties (some brokers include it; ECN brokers don’t).
  • Backtest currency mismatch: running EURUSD on a JPY-denominated account gives misleading P&L numbers — match account currency to symbol or convert P&L manually.

Pro Tips

  • Always backtest on a demo account first to confirm the EA loads and trades correctly before launching the Strategy Tester.
  • Keep a backtest journal — document each run’s settings, period, modelling quality, and results. Without it, you’ll lose track of which optimization run produced which numbers.
  • Forward-test for 4+ weeks before live deployment. Backtest performance and forward performance often diverge by 30-50%.
  • Match your live broker’s spread when configuring the test. ECN spreads are tighter than Standard spreads — testing on ECN spreads but trading on Standard inflates expected profit by 20-30%.
  • Save backtest results as files (right-click report → Save as Report) so you can reload and compare later.

Frequently Asked Questions

Why is my modelling quality only 25%?

Insufficient M1 history data. Open Tools > History Center, double-click your symbol’s M1 timeframe, and click Download. Re-run the backtest after the download completes.

How long should I backtest?

Minimum 1 year, ideally 3-5 years. Less than a year doesn’t capture enough market regimes (trends, ranges, news shocks) to validate the strategy.

Can the MT4 Strategy Tester test multiple symbols at once?

No. MT4’s tester is single-symbol. You’d need to run separate tests per symbol and aggregate manually. MT5’s tester supports multi-currency in a single run.

Why does my EA work in backtest but lose money live?

Most common causes: optimization over-fit, slippage not modelled, broker spread is wider live than in test, or the EA assumes execution speeds that don’t exist on retail accounts. Always forward-test on demo to catch these.

Can I backtest indicators or just EAs?

Only EAs. Indicators don’t place trades — the Strategy Tester is built to evaluate trade execution. To test an indicator’s signal quality, wrap it in an EA that trades on its signals.

How do I export the backtest report?

Right-click anywhere on the Report tab → Save as Report. MT4 generates an HTML file with all metrics, equity curve, and trade list — ideal for sharing or archiving.


Related Tutorials

Author: Dominic Walsh
blank

I am a highly regarded trader, author & coach with over 16 years of experience trading financial markets. Today I am recognized by many as a forex strategy developer. After starting blogging in 2014, I became one of the world's most widely followed forex trading coaches, with a monthly readership of more than 40,000 traders! Make sure to follow me on social media: Instagram | Facebook | Youtube| Twitter | Pinterest | Reddit | Telegram Channel