A backtest is a simulation. The strategy is run over historical prices as if they were arriving in real time, its trades are recorded with the costs the tester has been told to apply, and the results are summarised. MetaTrader 5 includes a strategy tester for this, and every EA vendor has used it.
How the tester works
The tester needs historical data for the instruments and the period. It can model prices in several ways: from real ticks where the broker supplies them, from ticks generated within each one-minute bar, from the one-minute bars alone, or from the open prices of the bars on the EA's timeframe. The first is the most realistic and the slowest; the last is fast and adequate only for strategies that act at the bar open and never look inside a bar. The tester applies a spread, either the historical one where the data includes it or a fixed figure, and can be told to apply commission and swap. It does not model slippage unless the EA does so itself.
What it reports
Net profit, the number of trades, the win rate, the profit factor, which is gross profit divided by gross loss, the maximum drawdown in balance and equity terms, the largest winning and losing trades, the average trade, and an equity curve. The report also shows the settings used, which is the first thing to check when comparing two tests.
What it is good for
Checking that the EA's logic does what it is meant to: that it places stops, sizes correctly, trades the markets and hours it should, and does not misbehave at a rollover or a gap. Getting a rough sense of a strategy's shape: how often it trades, how long it holds, what its drawdowns look like relative to its returns. Comparing the same strategy under different cost assumptions. And, run over a long period, seeing how the strategy behaved through conditions the live record has not yet met.
A vendor's backtest shows a 34 per cent annual return over five years. The report's header shows it was run on open prices only, with a fixed spread of 0.5 pips, no commission and no swap. Rerun on real ticks with the broker's historical spread, a $7 commission and swap, the same period shows 11 per cent, and the equity drawdown, which the first report understated because it looked only at bar opens, rises from 9 to 17 per cent. Neither test is a forecast. The second is at least a description.
Every backtest an EA vendor shows should be accompanied by its settings: the period, the tick model, the spread, whether commission and swap were included, and whether the parameters were chosen on the same data. If those are not shown, the backtest is a picture. If they are, it is a piece of evidence with known limits, to be read alongside the live record and never in place of it. The next page covers what those limits are.