What backtesting actually is, and what it is not
At its simplest, backtesting is the process of taking a defined set of trading rules and applying them to historical price data to see how they would have performed in the past. You are essentially asking the market a question: "If I had been trading this way for the last five years, what would have happened to my account?" The strategy tester replays history candle by candle, or tick by tick, and produces a synthetic track record showing every trade, every drawdown, and every dollar of profit or loss.
That sounds straightforward, and at a mechanical level it is. The subtlety lies in everything the simple definition leaves out. A backtest is a simulation, and a simulation is only as honest as its assumptions. If your historical data is incomplete, your backtest is fiction. If you ignore commissions and spreads, your backtest is fiction. If you tune your parameters until the curve looks beautiful on the exact period you tested, your backtest is fiction. The skill is not in pressing the "Start" button — anyone can do that — but in constructing the test in a way that gives you genuine information about how the strategy might behave in the future.
It is also worth being clear about what backtesting cannot do. A backtest cannot tell you that a strategy will work tomorrow. It can only tell you that, under a specific set of historical conditions, with a specific set of assumptions, the rules produced a particular pattern of results. Backtesting is best understood as a filter rather than a crystal ball: it eliminates obviously broken strategies and gives you a defensible reason to believe a surviving strategy has some edge worth testing further.
Why most retail backtests are essentially lies
Before we get into the mechanics, you need to understand the four ways that almost every amateur backtest is quietly broken.
Data quality. MetaTrader 5 will happily run a backtest using whatever historical data your broker has on file, but the quality of that data varies enormously. Some brokers store one price update per minute. Others store every tick. A strategy that depends on precise entry points, tight stops, or scalping logic will produce wildly different results depending on which dataset it ran against. The gold standard is "Every tick based on real ticks" using broker data that records actual price changes. Anything less, and you are essentially backtesting against a cartoon of the market rather than the market itself.
Cost modelling. New traders often run backtests with default spread settings and no commission, then wonder why their live account underperforms by thirty or forty percent. A professionally constructed backtest models realistic spreads — ideally variable spreads that widen during news events — and applies the same commission you will pay live. Well-respected developers test EAs at around $7 per lot in round-turn commission, which approximates the real cost on a tight ECN account.
Curve fitting. This is the deceptively easy trap of running an optimisation that tries thousands of parameter combinations until you find the one that produced the best historical equity curve. You are not finding an edge; you are finding noise that happens to look like an edge in this particular slice of history. Real edges are robust across parameter ranges; curve-fitted artefacts work only at the exact settings you tuned them to.
Broker dependence. Two different brokers, both showing the same headline modelling quality, can produce materially different backtests on the same strategy because their underlying tick streams differ. A strategy that looks profitable on one broker's data may be unprofitable on another's. Serious developers stress-test their strategies across multiple brokers.
The four pillars of a trustworthy backtest
Everything I have just described leads to a simple checklist you can apply to any backtest, whether you are running it yourself or evaluating someone else's results. Think of it as the four pillars: data, costs, robustness, and samples.
Data means real tick data of sufficient resolution to capture the price action your strategy depends on. The MT5 strategy tester offers "Every tick based on real ticks" as its highest-fidelity mode, and modelling quality should be at or near 99.9 percent. If you see backtests advertised at 90 percent or with no quality figure stated at all, treat them as marketing material rather than evidence.
Costs means you have modelled spread, commission, and slippage in a way that matches what you will actually experience live. Slippage should be set conservatively — slightly worse than what you typically see — so that your backtest is, if anything, biased against the strategy rather than in its favour.
Robustness means the strategy works across a range of parameter values rather than only at the optimal single point. Run a parameter sweep — test twenty or thirty different values around the chosen settings — and look at how the equity curve changes. If small parameter changes cause the strategy to collapse, you have a curve-fitted artefact.
Samples means you have tested across enough trades, enough market conditions, and enough symbols to reduce the chance that your results are a statistical fluke. A strategy with 30 trades over a year tells you very little. A strategy with thousands of trades across multiple pairs and regimes tells you a great deal.
Running the MT5 strategy tester step by step
With the principles in place, let us walk through the practical mechanics. Assume you have an EA installed in your MQL5/Experts folder, your platform is connected to a broker offering tick data, and you understand which pairs and timeframes the strategy is designed for.
1. Prepare your historical data. Open MetaTrader 5, press F2 to open the Symbols window, locate the pair you want to test, right-click and select "Specification" to confirm contract size, tick value, and commission schedule. Then download the available history for that symbol. The download can take several minutes for a pair with years of stored ticks — this is the foundation everything else rests on.
2. Open the Strategy Tester from the View menu or with Ctrl+R. Select your EA, choose your symbol and timeframe. For modelling mode, choose "Every tick based on real ticks". Set your date range to a period long enough to include multiple market regimes — at minimum two years, ideally five or more, including a period of high volatility like 2020 or the 2022 rate-tightening cycle. Set your initial deposit, leverage, and currency to match your real account.
3. Configure inputs. For your first run, use the developer's recommended default settings rather than trying to optimise. You want to know first whether the strategy works as designed, before you start fiddling.
4. Save your report — File menu, "Save as report" — because you will want to compare it against later tests on different data, different brokers, and different parameter settings.
The metrics that actually matter
The MT5 report displays dozens of numbers, but most of them are either redundant or misleading. Five metrics genuinely matter.
- Net profit (annualised)
- The headline figure is meaningless without context. $10,000 over five years on $100,000 starting capital is 2% per year — worse than a savings account. Always express profit as a percentage of starting capital, and always annualise it.
- Maximum drawdown
- Far more important than profit. A strategy that made 50% over three years but had a 40% drawdown along the way is psychologically untradable. Most experienced traders look for drawdowns under 20%, ideally under 15%.
- Profit factor
- Ratio of gross profit to gross loss. Below 1.3 is marginal once you account for live frictions. Above 2.0 over a large sample is excellent. Above 4.0 is usually a sign of curve fitting and should make you suspicious.
- Sharpe ratio
- Return per unit of volatility — the metric institutional investors actually care about. 1.0 is good, 2.0 excellent, 3.0+ is rare.
- Number of trades
- Below 100 trades, any backtest is anecdotal. Between 100 and 500, weak evidence. Above 500 across multiple pairs and regimes, meaningful evidence.
Stress testing: how professionals separate edges from noise
A single good backtest proves almost nothing, because it represents one specific path through history with one specific set of parameters. To find out whether you have a genuine edge, you need to stress-test the strategy in ways that try to break it.
Walk-forward analysis. Split history into chunks. Optimise on the first chunk, test the resulting parameters on the second chunk, which the optimiser has never seen. Then re-optimise on the second and test on the third, and so on. If the strategy holds up out-of-sample, you have evidence of a real edge.
Parameter sweeping with random settings. Generate hundreds of different parameter combinations and run them all. A robust strategy is profitable across a wide range of settings. A fragile strategy shows a single razor-thin spike of profitability surrounded by losses — the signature of curve fitting.
Cross-broker testing. Run the same strategy, parameters, and period on tick data from two or three different brokers. If results are broadly consistent, you have a strategy exploiting real market structure. If results diverge dramatically, you are exploiting one broker's data quirks.
Monte Carlo simulation. Take your list of historical trades, randomly shuffle their order thousands of times, and produce a distribution of possible equity curves. The headline backtest is just one curve; Monte Carlo tells you the range of plausible outcomes.
From backtest to live: the gap nobody talks about
Even a perfectly constructed backtest will not match your live results exactly. Three factors create the gap: execution (latency and slippage — run on a VPS close to your broker), regime change (the market that produced your backtest is not the market you will trade), and position sizing & psychology (the backtest assumes you execute every trade; in live trading you will be tempted to skip after losses, override during news, add size after wins — each intervention destroys the statistical edge the backtest measured).
A worked example: what a properly backtested EA looks like
To make this concrete, consider the standards a well-constructed Expert Advisor would meet. The Viper EA is a mean-reversion night scalper that trades during the low-volume window between roughly 23:00 and 01:00 GMT+2, when European traders have gone home and American markets are winding down. During this period, price action on certain currency pairs tends to range rather than trend.
What makes the EA interesting from a backtesting perspective is the development process. The strategy was developed using live results from earlier EAs as a starting point — meaning it was not designed in a vacuum and then curve-fitted to history, but refined from live performance data. Optimisation was carried out on 99.9% tick data, with $7 per lot round-turn commission included in every trade. Most importantly, the strategy was stress-tested with random parameter settings across all supported pairs — exactly the robustness check we described earlier.
The strategy supports 19 currency pairs including GBPCAD, EURCHF, AUDUSD, EURGBP, and several JPY crosses, giving it the multi-pair sample-size advantage. Advertised historical drawdown is in the single digits, trade frequency is high enough to produce statistically meaningful samples, and the recovery algorithm is designed to handle the mean-reversion strategy's primary failure mode.
None of this guarantees future performance — nothing can — but it illustrates what a properly tested EA looks like methodologically. When evaluating any EA, ask: What data quality? What commission and spread assumptions? Was it stress-tested across parameter ranges, or only reported at its optimal point? How many trades and how many pairs? What was max drawdown, over what period? Strategies that can answer transparently are worth your attention. Strategies that cannot are worth nothing, regardless of how impressive their headline equity curves appear.
The mental model to take away
Stop treating backtest results as predictions and start treating them as evidence. A backtest is one piece of evidence about a strategy. A single backtest, no matter how good, proves nothing. What matters is the convergent weight of evidence across multiple tests — different periods, different brokers, different parameter settings, different stress tests — all pointing in the same direction.
Run your own backtests. Run them on the highest-quality data your broker provides. Model your costs honestly. Sweep your parameters. Forward-test on out-of-sample data. Run Monte Carlo on your trade list. Test across multiple brokers if you can.
The market does not care about your effort, your conviction, or your story. It cares only about your edge. Backtesting is how you find out whether you have one before the market delivers the verdict.
