The short answer

Open the Strategy Tester (Ctrl+R), pick your Expert Advisor, set the symbol, timeframe, and date range, choose the "Every tick based on real ticks" modelling mode, turn on realistic spread and commission, and run. Then do the part most traders skip: optimise on one period, forward-test on the next, and judge the result by profit factor, Sharpe ratio, and maximum drawdown — not by total net profit. A backtest that has never seen out-of-sample data has told you nothing yet.

What the Strategy Tester actually does

The Strategy Tester replays historical price data through your Expert Advisor (EA) and records every trade it would have taken, with the spread, commission, and swaps you configure. It is a simulator, not a crystal ball: it answers "what would this exact set of rules have done on this data", and the quality of the answer depends entirely on the settings you choose before you press Start.

The single most important setting is the modelling mode. "Every tick based on real ticks" replays actual historical ticks and is the most accurate mode — use it for any result you intend to act on. "1 minute OHLC" and "Open prices only" are faster but approximate: they are fine for a first pass over many parameter combinations and misleading as a final verdict, because an EA that trades inside the bar behaves differently when it only sees the bar's open. "Math calculations" runs the EA without generating ticks at all, for pure optimisation of a formula. The rule is simple: explore fast, verify slow.

Set up a test that means something

A test that means something has five things decided before it runs:

  1. Symbol and timeframe that match the strategy. A scalper tested on H1 and a swing system tested on M1 are both testing a strategy that does not exist.
  2. A date range long enough to include a losing regime. A strategy tested only on a trending year has never been tested. How much history a backtest needs covers the sample-size arithmetic; the short version is that a handful of trades proves nothing, whatever the equity curve looks like.
  3. Realistic spread and commission. The tester lets you set both. Leaving them at zero is the most common way to manufacture a profitable backtest: fees and slippage are the line that changes the verdict, and a strategy that only works with costs switched off does not work.
  4. A forward-testing period held out from the start. Decide it before you optimise, not after.
  5. Position sizing decided by rule, not by feel. Risk a fixed fraction of equity per trade — the position-sizing guide works through the arithmetic, including a Python sizing snippet you can run. The tester sizes positions from the EA's inputs, so the sizing rule is part of the strategy being tested, not an afterthought.

That last point deserves a concrete example, because MetaTrader traders usually size in lots, and lots hide the risk. A $10,000 account risking 1% per trade risks $100. With a 50-pip stop and a pip value of $10 per lot, the size is $100 / (50 * $10) = 0.20 lots:

balance, risk_pct = 10000, 0.01
stop_pips, pip_value_per_lot = 50, 10.0
risk_dollars = balance * risk_pct          # 100.0
lots = risk_dollars / (stop_pips * pip_value_per_lot)
print(f"Risk ${risk_dollars:.0f} per trade -> {lots:.2f} lots")
# Risk $100 per trade -> 0.20 lots

Run that calculation for your own account and stop distance before you set the EA's lot input. If the lot size in the tester does not correspond to a risk percentage you chose deliberately, the test is measuring a different strategy than the one you will trade.

Optimisation: useful, and the fastest way to fool yourself

The tester can optimise: it runs the EA across a grid of input values, or with a genetic algorithm over a large parameter space, and ranks the results by a criterion you choose. Optimisation is legitimate — it is how you find which parameter values the strategy is robust to. It becomes self-deception the moment you pick the best-looking row and call it the strategy.

The defence is walk-forward validation, covered in full in the walk-forward guide: optimise on one window, test the winning parameters on the next window untouched, roll forward, and repeat. If the strategy only works on the window it was tuned on, the optimisation found noise, not an edge. A related check is to look at the neighbours of the best parameters: a genuine edge has a plateau of good results around it; a single spike surrounded by losses is overfitting wearing a profitable disguise.

Reading the report: the four numbers that matter

The tester report is long. Four numbers carry most of the verdict:

  • Profit factor — gross profit divided by gross loss. Below 1.0 the strategy loses money; above 1.5 it has room for live-trading reality to be worse than the test and still survive.
  • Sharpe ratio — return per unit of volatility. It punishes strategies that buy their returns with wild swings, which is exactly the punishment you want applied before real money is involved.
  • Maximum drawdown — the worst peak-to-trough fall in equity. Compare it against your own tolerance, not against other strategies: a 40% drawdown on a system you will abandon at 25% is a 100% loss in practice.
  • Total trades — the sample size behind the other three numbers. A profit factor of 2.0 across 12 trades is a rumour; across 300 trades it is evidence.

Total net profit, the number the report puts first, is the least informative of all: it scales with the test length, the lot size, and the deposit, and it says nothing about risk.

What the tester cannot tell you

Three things the tester cannot simulate honestly. First, your live fills: the tester executes at the prices in its data, while a live broker fills you at the prices available when your order arrives, which is worse whenever the market moves fast. Second, spread widening: the tester uses the spread you set, while real spreads widen around news and illiquid hours. Third, your own behaviour: the tester never hesitates, never overrides the EA after three losses, and never turns it off before a news event. Every one of those is a cost the backtest does not contain, which is why a backtest should clear its hurdles by a margin, not by a whisker.

What changed in September 2026

Two MetaTrader 5 builds changed how the Strategy Tester fits into a working day. Build 6180, published 3 September 2026, gave the terminal's built-in AI Assistant direct access to the Strategy Tester: it can retrieve testing and optimisation results, check the current tester settings, help configure optimisation criteria, and read the tester, terminal, and EA logs. Build 6230, published 24 September 2026, extended that: the assistant can now read an EA's input parameters and prepare them for a test run, launch and remove programs on charts, and query the built-in Economic Calendar.

What that means in practice is that the reading-the-report step — the slow, squinting part of backtesting — can start as a conversation: ask the assistant what the last test actually showed, and it reads the numbers rather than guessing from memory. Two limits still apply, and both matter. The assistant reads the tester's numbers, not your live fills, so everything in the previous section still holds. And the AI features turn on by signing in with an MQL5.community account, which provides the free plan — the assistant is a tool inside your terminal, not a separate product to buy. Check your own build under Help → About before assuming these tools are present: they arrived in the September 2026 builds, and anything older will not have them.

From a tested idea to a systematic strategy

Here is the honest limit of the whole workflow above: the Strategy Tester tests one EA, in one terminal, on one broker's data, with the code you wrote or bought. The moment the strategy needs to live somewhere else — a second broker, a second asset, a research notebook where you can compare it against other ideas — you are rebuilding it by hand.

That rebuild is the step where most MetaTrader traders stall, and it is the step an embedded engineer exists for. Take the rules that survived the tester — the entry logic, the sizing rule, the filters — and describe them; the strategy comes back built as a systematic strategy in a proper research environment, with the backtest, the walk-forward validation, and the sizing rules as code you own, not as settings buried in a terminal. If you trade MetaTrader and want that path, the starting point is the MetaTrader page: it lays out how QuantIDE works for MetaTrader traders.

What to do next

Pick one EA you already run or are considering, and run it through the full sequence this week: real-tick mode, costs on, a forward period held out before optimisation, walk-forward validation, and the four report numbers judged against the bars above. If it fails, you have learned something cheap. If it passes, you have a strategy with evidence behind it — and a sizing rule to match. The backtesting guide covers the same discipline in Python for strategies that live outside MetaTrader, and the two together are the complete loop: test honestly, validate out of sample, size by rule.

This article is education, not investment advice. Strategy Tester results are hypothetical by construction: past performance in a simulator is not a promise of live results.