
A backtest runs your Expert Advisor over historical price data and reports what it would have done. It is the quickest way to tell a promising EA from a hopeless one, and also the easiest place to fool yourself. Done with good data and realistic costs, it tells you whether a strategy is worth testing for real. Done carelessly, it produces a lovely equity curve that falls apart the moment real money turns up. Here is how to run one properly.
What a backtest is
The Strategy Tester in MT4 and MT5 replays past prices and lets your EA trade them under the same rules it would follow live. What comes back is a simulation, not a track record. A clean backtest earns a strategy the right to the next stage; it proves nothing on its own, because next month is not in the data. Treat the result as a filter, not a verdict — a way to reject bad EAs quickly, not to crown good ones.
The walk-through
The steps are the same in both platforms, though MT5's tester is faster and more honest with data. Work through them in order:
- 1. Pick the EA, symbol and timeframe. Load one EA, choose a single pair and the timeframe it was written for. Test one thing at a time.
- 2. Set a sensible date range. Use several years if you can, covering different conditions — trends, quiet ranges and at least one nasty shock.
- 3. Load good history first. Import quality data before you run anything. On MT4 aim for 90% modelling quality; on MT5 use the real-tick model. Poor data is the most common reason a backtest lies.
- 4. Set a realistic spread and commission. Do not test on a fixed one-pip spread. Use a variable spread close to your broker's real figures, and add the commission and swap you actually pay.
- 5. Run a visual test first. Watch the trades on the chart. Obvious nonsense — trading into news, stops that never move — shows up far faster by eye than in a report.
- 6. Optimise carefully, or not at all. The optimiser finds the settings that fit the past best, which is rarely what works next. If you must, keep the ranges small and hold data back to check the result.
A quick example
Say you backtest a trend EA on EUR/USD over five years. On a fixed 0.8-pip spread it shows £6,000 profit and a profit factor of 1.9. Re-run it with your broker's real variable spread, real commission and swap, and the same EA now shows £3,400 and a profit factor of 1.4. Nothing about the strategy changed — only the honesty of the test did. The second number is the one to trust, and even that is only a starting point.
What to read afterwards
The report throws a lot of figures at you. Four carry most of the weight:
- Net profit — what the account would have made after costs. On its own it means little.
- Profit factor — gross profit divided by gross loss. Roughly 1.3 to 1.6 is believable; much higher on few trades usually means curve-fitting.
- Maximum drawdown — the worst peak-to-trough fall. This is the number that tells you whether you could have held on.
- Modelling quality — how good the tick simulation was. A strong result on 25% quality is not a result.
Read profit and drawdown together. A big net profit that needed a 45% drawdown to earn it is not a system most people can actually sit through.
Why even a great backtest is not proof
A backtest knows the past perfectly and the future not at all. It cannot model tomorrow's slippage, a broker requote, a spread that widens during a news spike, or a strategy quietly going stale as the market changes. Hindsight is baked into every run, and the optimiser makes that worse.
So treat a good backtest as permission to continue, nothing more. Forward test it on demo or a small live account, in real time, on your own broker. Then watch the live account closely — that is the only version of the results that actually pays you.
The Karnek note
A backtest is a rehearsal, not the performance. Once your EA is live, Karnek reads the real results straight from your terminal — the actual fills, spreads and drawdown, not a simulation of them. It connects read-only and can never place a trade or touch the account, so it only ever reports what the EA did.
Written and reviewed by the Karnek Research team. Last updated August 2026.
Educational content only - not financial advice. Past performance does not predict future results. Trading carries significant risk.