The flagship product moved to fxroboteasy.com
Forex Robot Easy
tutorialMetaTrader 5 Expert Advisors
By William Harris · Reviewed by William Harris · Published May 21, 2026

The MT5 Strategy Tester is the most powerful backtesting tool available to retail forex traders — and also the most widely misused. Traders trust its results without understanding what those results actually measure. This guide explains every setting, every quality mode, and every mistake that produces misleading results — so you can use the Strategy Tester correctly and stop making decisions based on fictional equity curves.

What the MT5 Strategy Tester Actually Does

The Strategy Tester replays historical price data through your Expert Advisor, simulating how it would have traded in the past. The key word is "simulates" — it's a mathematical model of real trading, not real trading.

Three things determine how realistic the simulation is:

  1. The quality of historical price data (tick data vs M1 bars vs generated ticks)
  2. The modeling method (Every Tick vs OHLC)
  3. Your broker's actual spread and execution conditions

Get any of these wrong and the backtest results are fiction — often optimistic fiction.

Opening the Strategy Tester

In MetaTrader 5, press Ctrl+R or go to View → Strategy Tester. A panel opens at the bottom of the screen.

Key tabs:

  • Settings: Where you configure the EA, symbol, period, dates, and initial deposit
  • Results: Trade-by-trade list after the test runs
  • Graph: Equity curve
  • Report: Full statistical report
  • Optimization: For parameter sweeps

Understanding the Settings Tab

EA and Symbol Selection

Select your EA from the Expert dropdown. Select the currency pair. Choose the timeframe the EA is designed for — this matters significantly for execution quality.

Modeling Method — This Is Critical

MT5 offers three modeling modes:

Every Tick Based on Real Ticks

The highest quality mode. Uses actual historical tick data downloaded from your broker. The Strategy Tester replays every bid/ask tick that occurred during the test period, simulating execution precisely as it would have happened.

Requirements: Your broker must have tick data available. In MT5, right-click the chart → Data Accessibility → this shows what data your broker provides. Many brokers have limited tick history.

Every Tick Based on M1 OHLC (Recommended for most users)

MT5 uses M1 candlestick data (1-minute open, high, low, close) and generates synthetic tick data by interpolating between the M1 bars. This is the standard mode for most backtesting.

The quality of generated ticks is good enough for swing trading and most daily/H4 systems. For scalping EAs where entry at a specific price matters significantly, this mode can produce optimistic results compared to live trading.

Open Prices Only

Only the candle open price is used for execution. The EA makes decisions only at the start of each bar. This is the fastest mode but the least realistic. Useful only for initial testing to confirm logic, not for performance evaluation.

Which mode to use:

  • Scalping EAs: Every Tick Based on Real Ticks (if available) or Every Tick Based on M1 OHLC
  • Swing/Position EAs: Every Tick Based on M1 OHLC
  • Logic testing: Open Prices Only

Date Range

Set the start and end dates for your backtest. Standard approach:

  • Backtest period: 3–5 years minimum
  • Include at least one major market stress event: The 2020 COVID crash, the 2022 Ukraine war spike, or the 2023–2024 rate volatility period
  • Leave out-of-sample period: Don't test on all available data. Reserve 25–30% for walk-forward validation. See walk-forward analysis for the full methodology.

Initial Deposit and Currency

Set your starting balance to match your actual account size. For micro accounts ($500–$2,000), the lot size constraints affect EA behavior — test with your actual balance.

Select the correct account currency to ensure P&L is reported correctly.

Spread

This is one of the most commonly misconfigured settings.

Current spread: Uses the spread active at the moment you run the test. Not representative of historical spread conditions.

Custom (X points): You manually set a fixed spread. Useful for controlled testing.

Best practice: Use a spread value that represents the average spread you actually get during your typical trading hours on your actual broker. For EUR/USD on a good ECN broker, this is typically 0.1–0.5 pip. For a market maker, 0.8–1.5 pips. Using 0 spread (which MT5 sometimes defaults to) makes scalping EAs look impossibly good.

Optimization Mode

For regular backtesting (not optimization), leave this at "Disabled."

Deposit Currency and Leverage

Match these to your actual account. Leverage affects margin calculation. For most EAs, 1:100 or 1:200 is typical; confirm your broker's maximum.

Running the Backtest

Click Start (the play button). The progress bar fills as the Strategy Tester works through the data.

Test duration depends on:

  • Date range (longer = slower)
  • Modeling method (Every Tick is 10–50× slower than Open Prices Only)
  • Number of operations (active EAs make more calculations)

A typical 3-year, Every Tick Based on M1 OHLC backtest on a modern PC takes 5–60 minutes depending on EA complexity.

Interpreting the Results

The Graph Tab

The equity curve shows your account balance and equity over the backtest period. A useful equity curve:

  • Shows visible drawdown periods (no real EA avoids them)
  • Has a generally upward slope without suspicious smoothness
  • Recovers from drawdown periods in a reasonable time

Equity curve red flags:

  • Perfectly smooth line at 45 degrees: suggests look-ahead bias or backtest error
  • Single massive spike upward: the EA had a lucky run that distorts the curve
  • Doesn't recover from a major drawdown period visible in the dates: strategy may have died

The Report Tab — Key Metrics

Profit Factor Total gross profit divided by total gross loss. Above 1.5 is acceptable; above 2.0 is strong; below 1.2 means weak edge.

Expected Payoff Average profit per trade. Negative = losing strategy.

Maximum Drawdown (Absolute and Relative) The largest peak-to-trough decline. Relative drawdown (% of balance) is more meaningful than absolute (dollar amount). Under 20% relative is good; under 15% is strong for most EA styles.

Recovery Factor Net profit divided by maximum drawdown. Above 3.0 means the net profit is 3× the worst drawdown experienced — a reasonable risk-reward profile.

Sharpe Ratio Available in the full report. Above 1.0 is acceptable; above 1.5 is strong. Sharpe ratio explained in detail here.

Total Trades Statistical significance matters. Under 100 trades across a 3-year period is insufficient to draw conclusions. An EA that made 15 trades in 3 years and profited isn't demonstrating edge — it's demonstrating luck. 300+ trades provides reasonable statistical grounding.

Win Rate vs. Reward:Risk Ratio These two numbers together tell the real story. A 40% win rate with 2:1 average reward:risk is profitable. A 70% win rate with 0.5:1 average reward:risk breaks even or loses. Look at both together, never in isolation.

The Results Tab

Lists every individual trade with entry price, exit price, profit, and open duration. Useful for:

  • Identifying if winning trades systematically occur in specific sessions
  • Checking if large wins/losses skew the statistics
  • Seeing if the EA has clustering (many consecutive wins or losses — possible regime dependency)

Walk-Forward Validation — The Professional Standard

A single backtest on the full data history is insufficient for serious evaluation. The correct methodology is walk-forward analysis:

  1. Divide your data into multiple periods
  2. Optimize on the first "in-sample" period
  3. Test on the next "out-of-sample" period (no optimization)
  4. Roll forward and repeat

MT5's Strategy Tester has a built-in walk-forward mode (enable in Optimization settings). The full methodology is covered in How to Backtest an MT5 EA with Walk-Forward Analysis.

The key metric from walk-forward: if the out-of-sample results are within 30–50% of the in-sample results, the strategy has some genuine edge. If out-of-sample results collapse, the parameters are overfit.

The Optimization Function

MT5's built-in optimizer sweeps your EA's parameters across ranges you define and ranks the resulting parameter combinations by your chosen criterion (maximize profit, maximize Sharpe, minimize drawdown, etc.).

How to Use Optimization Without Overfitting

Step 1: Run a genetic algorithm optimization (faster than exhaustive) with 1,000–5,000 passes.

Step 2: Look at the results cloud, not just the top result. If a small cluster of parameters dominates and good results are surrounded by terrible results (highly sensitive parameter space), you're in an overfitting zone. Robust parameters show islands of good performance with gradual degradation around them.

Step 3: Take the top 5–10 parameter combinations from optimization and run them on out-of-sample data. Only trust combinations that also perform reasonably on unseen data.

Step 4: Never re-optimize on the same data window more than once. Each re-optimization pass increasingly overfits to historical noise. See MT5 EA optimization mistakes to avoid for the full list.

For parameter spaces with more than 100,000 combinations, exhaustive search takes prohibitively long. Genetic algorithm optimization samples the space intelligently, finding high-performing regions faster. MT5 supports both.

For initial parameter discovery: genetic algorithm. For fine-tuning around a known-good parameter set: exhaustive on a narrow range.

Downloading Better Historical Data

MT5 downloads historical data from your broker automatically, but broker data quality varies significantly. For more accurate backtests:

Option 1: Use Tickstory Tickstory is a third-party application that downloads complete tick data from Dukascopy (a Swiss bank with excellent data archives). It exports data in MT5-compatible format. Free for basic use.

Option 2: Download from Dukascopy directly Dukascopy's JForex platform allows direct tick data export. The data covers most major and minor pairs from 2003 onward.

Why this matters for scalping: Broker-provided tick data often has gaps and inconsistencies that make scalper backtests look better than reality. Third-party data sources show what execution would actually look like.

See Tick Data Sources for MT5 Backtesting for a complete comparison of data providers.

Multi-Currency and Multi-Timeframe Backtesting

Standard MT5 Strategy Tester tests one pair/timeframe at a time. For EAs that trade multiple pairs simultaneously, this creates a problem: the correlation between pairs during the backtest period isn't simulated.

MT5's workaround: The "Forward Testing" mode allows you to run the EA on one period and then test it on a second period without reoptimization — but this doesn't solve the multi-pair correlation problem.

True multi-pair portfolio backtesting requires either:

  • A specialized backtesting platform (StrategyQuant, Forex Tester 5)
  • Manual correlation analysis across separate single-pair backtests
  • Custom MT5 tester with synchronized multi-symbol tick replay

For most retail users, single-pair backtesting with careful attention to correlation risk during live trading is the practical approach.

Common Backtesting Mistakes to Avoid

Mistake 1: Testing on all available data, then deploying

This is in-sample bias. The results include the period your parameters are implicitly adapted to. Always reserve 20–30% of your data as an out-of-sample forward test.

Mistake 2: Using a different broker for backtesting than live trading

Spreads, swap rates, and tick frequency differ between brokers. A backtest on Broker A's data doesn't predict performance on Broker B.

Mistake 3: Setting spread to 0 or minimum current spread

Your live trading will have wider spreads during news events, session opens, and periods of low liquidity. Test with a realistic average spread.

Mistake 4: Judging by profit factor alone

High profit factor on 50 trades is statistically meaningless. Require minimum 200–300 trades for meaningful profit factor statistics.

Mistake 5: Optimizing without walk-forward validation

Optimized parameters that look great on historical data collapse in live trading routinely. This is the most common cause of EA disappointment. Walk-forward is non-negotiable.

Mistake 6: Ignoring the strategy tester's quality percentage

After a backtest, MT5 reports "Quality: 90%" or similar. This reflects how complete the tick data was. Under 90% quality means significant gaps in simulation accuracy.

Frequently Asked Questions

How do I get the full MT5 Strategy Tester report?

After running a test, right-click in the Report tab and select "Save as Report" — this saves an HTML file with complete statistics. For professional evaluation, this report provides more metrics than the default tab view.

Why does my backtest show different results each time I run it?

If you're using "Every Tick Based on M1 OHLC," the synthetic tick generation has a random element. Enable "Use date" for the random seed in Strategy Tester settings to get consistent results. For true reproducibility, use Real Tick data.

Can I backtest a News EA in the Strategy Tester?

Partially. The Strategy Tester replays price data but doesn't simulate actual news event timing or the spread widening that occurs during news. News EA backtests are notoriously optimistic compared to live performance.

What's the difference between the balance and equity lines on the graph?

Balance updates only when trades close. Equity updates continuously, reflecting open trade P&L. During large drawdown in open positions, equity can drop significantly below balance. Always monitor both.

My EA shows 500% return in the backtest but loses in live trading — why?

The most common causes: overfitted parameters (see walk-forward analysis), spread misconfiguration in the backtest, look-ahead bias in the EA code, or broker execution differences (slippage, requotes) not modeled in the tester. This is the most important lesson in backtesting: simulated results are not predictive of live results without additional validation.


Backtesting is an educational tool, not a profit guarantee mechanism. The Strategy Tester simulates historical conditions that will not repeat exactly. All trading involves risk of loss.

About William Harris

William Harris is the founding editor of Forex Robot Easy. He has spent over a decade building and reviewing algorithmic trading systems on MetaTrader 4 and 5, with a focus on machine learning, walk-forward validation, and execution mechanics.