Backtesting in a platform strategy tester: how to keep the results realistic
The strategy testers in MetaTrader 4 and 5 are popular ways to run a first backtest. They are convenient, but the result depends heavily on the quality of the price history, the testing mode and the assumptions about costs. This guide explains what to check so that a test is as realistic as the tool allows. It is educational and not an endorsement of any platform.
What the tester actually does
A tester replays historical prices through your rules and records the trades that would have occurred. It does not know how the market would have reacted to your orders, and it simulates fills from the data it has. The more detailed the price data, the more realistic the simulation of stops, targets and intrabar movement.
Testing modes and what they imply
- Open-price-only modes are fast but only evaluate decisions at the start of each bar, so intrabar stops and targets are not modelled.
- One-minute or bar-based modes approximate movement inside a bar, which can misplace the order of a high and a low.
- Tick-based modes simulate or replay individual price changes and are more realistic, but slower and dependent on the quality of the tick data.
- Real-tick modes use recorded ticks from your broker where available, which gives a closer picture of spreads and gaps.
Check the data quality
- Look at the coverage and the reported modelling quality, and treat low values as a warning.
- Make sure the history has no large gaps and uses the same time zone assumptions as your rules.
- Test on the same instrument and the same broker feed you plan to practise or trade on, since spreads and sessions differ.
Include the costs
Set a realistic spread rather than the best one, include commissions and financing, and consider adding slippage. For frequent strategies, costs can turn a small edge negative. Compare results with and without them.
Do not trust a single run
- Split the history and keep a final block that the optimiser never sees.
- Run forward tests or walk-forward analysis to see whether results hold on new data.
- Look at the stability of results across a range of parameters, not only the best setting.
- Check the number of trades and the largest losing streak, not only the net profit.
Where TradeCC fits
You can describe your test setup, settings and results to CC and ask it to look for unrealistic assumptions, look-ahead bias and missing costs. TradeCC runs its own historical backtests, started only after you confirm a strategy draft in the conversation; they are separate from the MT5 Strategy Tester. TradeCC does not connect to MetaTrader accounts; this is a research aid and not investment advice.
Frequently asked questions
Is a high modelling quality enough to trust a backtest?
No. It indicates the quality of the price data used, not whether the strategy is overfitted, whether costs are realistic or whether the rules look ahead.
Why do backtest results differ from my live results?
Common causes are optimistic costs and fills, differences in data and spreads, look-ahead bias, overfitting and changes in market conditions.
Should I optimise parameters in the tester?
Optimisation can be useful, but it increases the risk of overfitting. Keep out-of-sample data aside and prefer settings that work across a neighbourhood of values.