<!DOCTYPE html>How to Backtest Strategy for MT5 โ€” MixFunded
MixFunded
Education library

Platforms8 min read

How to Backtest Trading Strategy for MetaTrader

Quick answer

Strategy tester fit show how system perform for back-days โ€” but only if you understand the data limits and avoid 'curve fitting'.

Backtesting na when you run your trading strategy against old price data to see how e for perform. Na very useful step before you risk real money, but e easy to get backtest wey look too fine but no tell you anything true about the future, mostly because the data no good or you don over-force the settings.

This guide covers how to run a backtest in MetaTrader 5's strategy tester, what to watch for in the results, and why a strong backtest should be followed by forward testing before it is trusted with meaningful size.

How to use MT5 strategy tester

Open the Strategy Tester from the View menu or press Ctrl+R. Select the expert advisor (EA) wey you wan test, the pair, the timeframe, and the date range for the period. Pick a model โ€” 'Every tick based on real ticks' na the most accurate but e need tick data and e dey slow; 'Open prices only' fast but e no dey too accurate for wetin happen inside the candle.

Set your starting deposit, leverage, and spread to match real account instead of just using default values, then run the test. The results go show summary of net profit, drawdown, win rate, and profit factor, plus full report of every trade and equity curve chart to show how the account balance move.

Data quality and modelling assumptions

A backtest is only as reliable as the data behind it. Many brokers' free historical data has gaps, incorrect spreads, or missing tick-level detail, particularly on less common instruments or during volatile periods, and a strategy tested on poor data can show results that would never occur live. MT5 allows you to download higher-quality tick data through its history centre, and it is worth checking the quality report the tester produces, which shows what percentage of ticks used were modelled versus real.

Modelling assumptions also matter pass just price data. Many times, spread dey stay one place for backtest even though for real life e dey wide during news; slippage self dem no dey always add am unless you set am; and swap costs for trades wey reach next day must dey there for any strategy wey dey hold pass 24 hours. Any backtest wey ignore these three things go just dey lie give you say the result sweet.

  • Use 'Every tick' wey base on real ticks if e dey, and check di modelling quality percentage well well
  • Set realistic spread wey fit change or stay fixed, no just leave am for default zero-spread
  • Add estimate for slippage and swap costs if e mata for your strategy

Di risk of curve fitting

Curve fitting happens when a strategy's parameters are adjusted repeatedly against the same historical data until the results look strong, effectively tailoring the rules to that specific period's noise rather than to a genuine, repeatable edge. A telltale sign is a strategy with many finely tuned inputs โ€” an unusual stop distance, an oddly specific moving average length โ€” that performs exceptionally on the tested period and considerably worse the moment the data changes even slightly.

Better way to check na to split your data: optimize your settings for one part of history, den run di same settings for another part wey di optimization no see before. Strategy wey still stand gidigba for di 'out of sample' part get better chance to be real; di one wey collapse don likely be 'fitted to noise' instead of real pattern.

Forward testing before you scale up

Backtest, no mata how you build am, no fit catch everything for live trading โ€” like execution wahala, how you go behave under real risk, and conditions wey never happen before. Forward testing for demo account, to watch as di strategy dey trade live without financial risk, na di next step, and e suppose run long reach to see how di strategy go behave for different market conditions, no be just for one sweet week.

Once strategy don stand for forward testing, to move go lower-cost evaluation account before you commit to bigger funded programme na sense. E go help you confirm if e fit hold under real drawdown pressure and real psychological tension wey backtest or demo no fit show. To treat evaluation stage as part of di testing, instead of to jump go maximum size, dey produce better results for long term.

Frequently asked questions

Wetin be di difference between 'Every tick' and 'Open prices only' for MT5 tester?

'Every tick' wey base on real ticks dey simulate how price move inside every candle using real historical data. E dey give di most realistic result but e dey take more data and time. 'Open prices only' dey use only di opening price of each candle, e dey run fast fast but e dey miss all di details of how price take move inside di bar, and dis fit give wrong results for strategies wey need to see wetin happen inside di candle.

How I go take know if my backtest results na curve fitted?

Common sign na when strategy get many many settings wey you don fine-tune and e come dey perform too well for only one specific time. To test di same settings for another period wey you no use optimize am na di best way to check โ€” if performance drop well well for di new period, e mean say na curve fitting.

I suppose jump from backtesting straight to funded account?

E better make you forward test for demo account first, den confirm di strategy for small-cost evaluation before you carry big money or energy enter. Backtesting and demo no fit fully show real drawdown pressure, so to treat evaluation as another test with small stakes na wise step before you scale up.

Trade am for funded account

MixFunded evaluations start from $5. We dey process rewards every Monday for USDT (TRC-20) and we dey publish am on-chain.