Skip to content
All articles

How-to guides

How to Backtest an EA in the MT5 Strategy Tester and Read the Report

SmartEA Research, 2026-10-22, updated 2026-11-12, 7 min read

How to Backtest an EA in the MT5 Strategy Tester and Read the Report

Short answer: to backtest an EA in MetaTrader 5, open the Strategy Tester with View > Strategy Tester (Ctrl+R), choose the Expert Advisor, the symbol and the timeframe it is designed for, set a date range of several years, pick Every tick based on real ticks as the modelling, enter a realistic deposit and leverage, load the preset you plan to use and click Start. Then read the Backtest report, focusing on maximum equity drawdown, profit factor, recovery factor and the shape of the equity curve, not just net profit.

A backtest is a simulation, not a promise. Used well, it tells you how an EA behaves, how deep its losses have been and which conditions hurt it. Used badly, it produces a nice curve that means very little. This guide covers both sides.

Step 1: Open the Strategy Tester

In MT5 click View > Strategy Tester or press Ctrl+R. The tester opens at the bottom of the terminal. If you see a start page with test types, choose a single test of an Expert Advisor.

Step 2: Configure the test

Expert and symbol

Select the EA from the list (it must be installed in MQL5\Experts; see how to install an EA in MT5). Choose the symbol and timeframe from the EA's description. For example, our gold EAs are tested on XAUUSD with the H1 timeframe. The EA can still read other timeframes internally.

Date range

Use several years. A test of a few months only shows one kind of market. Include strong trends, quiet ranges and high-volatility periods. If you can, also run the latest months separately, so you can compare them with a demo account later.

Modelling

  • Every tick based on real ticks: uses the broker's recorded tick history, including real spreads where available. The most realistic choice and the one to use for final checks. It needs more disk space and time.
  • Every tick: generates ticks from minute data. Faster and useful for quick checks, but spreads and intrabar paths are simulated.
  • 1 minute OHLC: only four prices per minute. Fine for rough optimisation, risky for grid, scalping and break-even logic.
  • Open prices only: only for EAs explicitly written to trade at bar open. Misleading for most others.

Deposit, currency and leverage

Enter the deposit you would really trade, in your account currency, and your account's leverage. Testing a $2,000 strategy with $100,000 makes drawdowns look tiny; testing it with $500 can make it stop on margin.

Delays

The delay setting simulates execution latency. "Zero latency, ideal execution" is the most optimistic. Adding a realistic or random delay is a useful stress test, especially for short-term EAs.

Inputs

Open the Inputs tab and load the .set preset you plan to use (right-click > Load). Testing default settings and then trading a more aggressive preset defeats the purpose.

Step 3: Run it, and consider visual mode

Click Start. The first run with real ticks may take a while because MT5 downloads history from the broker. Tick the Visual mode option to watch the EA trade on a chart at accelerated speed. It is slow for long tests, but watching a few weeks is the quickest way to understand how an EA opens, adds to and closes trades.

Step 4: Read the report

After the test, open the Backtest tab. These are the numbers that matter most:

Total net profit and gross profit/loss

The headline result. On its own it says little: the same profit can come from a smooth strategy or from one that nearly emptied the account along the way.

Balance drawdown vs equity drawdown

The report shows both. Balance drawdown counts only closed trades. Equity drawdown includes floating losses on open positions. For grid and basket EAs, equity drawdown is the one to judge by, because losing positions can stay open for a long time before the basket closes. Look at the maximal value in money and the relative value in percent.

Profit factor

Gross profit divided by gross loss. Above 1.0 means the EA earned more than it lost in the test. Very high values on a small number of trades are often the result of a short test or over-optimisation.

Recovery factor

Net profit divided by maximum drawdown. It shows how much the EA earned for each unit of pain. A higher value is better, but compare EAs over the same period.

Expected payoff

The average result per trade. Compare it with your broker's spread and commission: a small expected payoff is easily eaten by trading costs.

Sharpe ratio and trade statistics

The Sharpe ratio relates returns to their variability. The trade statistics show the number of trades, the share of winners, the largest win and loss, and the maximum consecutive losses. The longest losing streak is worth writing down: it will happen again in some form.

History quality

Shows how complete the price data was. Low quality means the result is less reliable.

The graph

The balance and equity lines show the path. Look for long flat periods, deep dips in the equity line that the balance line hides, and whether most of the profit came from one short period.

Mistakes that make backtests look better than reality

  • Over-optimisation. Tweaking inputs until the curve looks perfect fits the past, not the future. Prefer settings that work reasonably across a range of values.
  • Short tests. One good year is not evidence.
  • Unrealistic spread. A fixed low spread hides the cost of wide spreads at rollover and during news.
  • Wrong server time. Time-based strategies tested on history from a broker with a different time zone shift every session.
  • Ignoring equity drawdown. Especially for grid EAs.
  • Testing one preset, trading another.

What a backtest cannot tell you

A backtest cannot reproduce slippage in fast markets, requotes, connection problems, broker-specific execution or the effect of your own decisions, such as switching the EA off during a drawdown. It also cannot tell you what the market will do next. That is why the next step is always a demo account with your broker for a few weeks, followed by a small real account if you continue.

Testing our EAs

All three of our gold EAs run in the Strategy Tester without a license. Create a free account, download the EA from your dashboard and test it with your broker's data:

  • Smart Rider Gold EA: judge it by maximum equity drawdown, because baskets have no per-trade stop loss. Start with the default settings, then try a larger balance per 0.01 lot.
  • Smart Striker Gold EA: look at losing streaks and clustered stops when several strategies trade the same level.
  • Smart Archer Gold EA: check the deepest baskets and test with the drawdown protection switched on at the level you would use.

The exact settings we use, and our results to compare with, are in how to backtest SmartEA gold EAs. Use real ticks, a GMT+2/GMT+3 broker and the deposit you would really trade. For live track records, read how to read EA performance statistics.

Once you have reports for several EAs, compare them with our checklists for choosing a gold EA for MT5 and the best forex EA.

Frequently asked questions

How many years should I backtest?

As many as your broker's data allows, and at least a few years, so the test includes different market conditions.

Why is my backtest different from someone else's?

Different brokers have different prices, spreads, server times and history quality. Different modelling modes, deposits and inputs also change results.

Is "every tick based on real ticks" always available?

It depends on the broker's tick history for the symbol and period. Where it is missing, MT5 falls back to generated data for that part of the test.

Can I trust a backtest screenshot from a seller?

Treat it as a claim, not as evidence. Run the test yourself with the same settings.

What is forward testing?

Forward testing means running the EA on new data it was not tuned on: either the tester's forward period option, or a demo account in real time. It is the best check against over-optimisation.

Backtests are simulations and do not predict future results. Real trading includes slippage, changing spreads and execution delays. Always follow a backtest with a demo test and only trade money you can afford to lose.

Follow SmartEA Insider on Telegram

SmartEA Insider: results of our own live accounts, new versions and release notes. No trade signals.

Join the channel

Put it into practice

Backtest one of our Expert Advisors for free in the Strategy Tester.

Browse Expert Advisors