Table of Contents
What Is Backtesting?
Backtesting is the process of testing a trading strategy on historical data to see how it would have performed. Before risking real money, you want evidence that your strategy has a statistical edge. Backtesting provides this evidence by simulating hundreds or thousands of trades across past market conditions.
A properly backtested strategy gives you confidence in your edge, realistic expectations for drawdowns, and the data needed to optimize position sizing. A strategy that has never been backtested is a gamble, regardless of how logical it sounds in theory.
Manual Backtesting Method
Step 1: Open your charting platform (MT5 on Exness or XM) and scroll back to historical data. Go back at least 12 months, ideally 2-3 years.
Step 2: Start from the earliest date and scroll forward candle by candle. When your strategy generates a signal, record the trade details: entry, stop, target, result.
Step 3: Do not skip ahead to see what happens next. This introduces look-ahead bias — the most dangerous form of backtesting error. Use the chart replay feature if your platform supports it.
Step 4: Record at least 100 trades. Fewer than 100 trades does not provide statistically significant results. For strategies that trade infrequently (weekly signals), you may need 3-5 years of data.
Step 5: Calculate performance metrics: win rate, average win, average loss, profit factor, maximum drawdown, and expectancy.
Automated Backtesting
MT5's built-in Strategy Tester allows you to code your strategy as an Expert Advisor (EA) and run it on historical data automatically. This is faster and eliminates human bias.
Pros: Tests thousands of trades in seconds. No look-ahead bias. Can test across multiple pairs and timeframes simultaneously.
Cons: Requires MQL5 programming knowledge (or hiring a developer). Cannot easily account for discretionary elements like "strong rejection candle at support."
Recommendation: Start with manual backtesting to validate your strategy concept. Once confirmed, code the rule-based elements into an EA for large-scale testing and optimization.
Avoiding Common Biases
Look-ahead bias: Seeing future data while backtesting. Use candle-by-candle replay to avoid this.
Curve-fitting: Optimizing strategy parameters so precisely that they match historical data perfectly but fail on new data. If your strategy only works with RSI 13 on EUR/USD H4 but fails on every other setting, it is likely curve-fitted.
Survivorship bias: Only backtesting on instruments that exist today. Some forex pairs or stocks that were available in 2020 may have been delisted. This is less of an issue in forex than in stocks.
Selection bias: Only backtesting during periods that favour your strategy. Test across different market conditions: trending, ranging, high volatility, low volatility.
The backtesting guide says use realistic data. Exness MT5 Strategy Tester gives you tick-by-tick historical data on all instruments — no need to buy third-party data feeds. Run your strategy on 10 years of EURUSD data or 5 years of gold. Free with any account.
Access Free Backtest DataKey Performance Metrics
| Metric | Target | What It Tells You |
|---|---|---|
| Win Rate | 40-60% | How often you win |
| Profit Factor | Above 1.5 | Gross profit / gross loss |
| Max Drawdown | Under 20% | Worst losing streak impact |
| Expectancy | Positive | Average $ per trade |
Forward Testing After Backtesting
After backtesting confirms a strategy has a positive expectancy, the next step is forward testing (also called paper trading or demo trading). Trade the strategy in real-time on a demo account for 2-3 months. This validates that the backtest results hold in live market conditions with real-time execution, slippage, and spread costs.
Only move to real money after both backtesting AND forward testing show consistent positive results. Skip this step and you risk discovering that your backtested strategy does not work in practice — a lesson that costs real money.
You now know how to avoid survivorship bias, look-ahead bias, and curve fitting. The next step is applying this methodology to real data. MT5 Strategy Tester on Exness is free, unlimited, and uses the same data feed as live accounts.
Start Backtesting NowStep 5 warns about overfitting. The fix is forward testing on demo. Exness demo accounts run indefinitely with live market data — forward test your backtested strategy for 30 days before going live. If the demo results match your backtest, you have something real.
Forward Test on Live DemoFrequently Asked Questions
How many trades do I need for a valid backtest?
Minimum 100 trades for statistical significance. Ideally 200-500 trades across different market conditions. Fewer than 50 trades gives you essentially random results that cannot be trusted.
Can I backtest manually on MT5?
Yes. Use the chart replay feature on MT5 to scroll through historical data candle by candle. This is the best method for strategies that include discretionary elements like candlestick pattern quality.
What profit factor should a good strategy have?
A profit factor above 1.5 is considered good. Above 2.0 is excellent. If your backtest shows a profit factor above 3.0, you should be suspicious of curve-fitting — retest on out-of-sample data.
Should I backtest on one pair or multiple pairs?
Start by backtesting on one pair to validate the concept. Then test on 2-3 additional pairs. If the strategy works across multiple pairs, it is more robust and less likely to be curve-fitted to a single instrument.