Back to Blog

Backtesting Your Expert Advisor: Stop Trusting the Wrong Numbers

We've reviewed hundreds of EA backtests. Some come from clients who built their own EAs. Some come from traders who bought commercial systems. Some come to us from people who hired developers elsewhere. And the same pattern shows up constantly: beaut

Viprasol Tech Team
March 7, 2026
10 min read

Backtesting Your Expert Advisor: Stop Trusting the Wrong Numbers | Viprasol Tech

Backtesting Your Expert Advisor: Stop Trusting the Wrong Numbers

By Viprasol Tech Team | Trading Software Development


We've reviewed hundreds of EA backtests. Some come from clients who built their own EAs. Some come from traders who bought commercial systems. Some come to us from people who hired developers elsewhere. And the same pattern shows up constantly: beautiful equity curves that fall apart within weeks of going live.

The problem almost never traces back to the strategy. It traces back to how the backtest was run and, more often, how the results were interpreted. A backtest can tell you genuine, useful truths about a strategy's historical behavior โ€” but it requires running it correctly and reading the right numbers. This guide covers both.


The MT5 Strategy Tester: Which Mode Actually Matters

Open MetaTrader 5's Strategy Tester and you'll see a modeling dropdown. Most traders pick whatever runs fastest. That's the wrong approach.

Every Tick Based on Real Ticks uses actual historical tick data from MetaQuotes' servers โ€” the real bid/ask sequence, with real spread widening during volatile periods. This is the only mode that gives you an accurate picture of how the EA would have behaved in live conditions. For any strategy that relies on intrabar timing โ€” scalpers, strategies with tight stops, news-based systems โ€” this is the mode you should be using.

Every Tick (simulated) constructs synthetic ticks between OHLCV bars using an interpolation algorithm. Faster than real ticks, less accurate. Acceptable for strategies on 1-hour or higher timeframes where you mostly care about direction, not exact entry timing.

OHLC on M1 trades only at the open, high, low, and close of M1 bars. Significantly faster โ€” useful for testing a daily strategy across 20 years of data. Not useful for anything that makes intrabar decisions.

Open Prices Only โ€” testing on bar opens only. Valid only for strategies that literally trade at bar open and do nothing else. If your EA sets stops or targets that could hit before the next bar, this mode will give you incorrect results.

Before the mode question, download the data. In MT5: Tools โ†’ History Center โ†’ select your instrument and timeframe โ†’ download. For EURUSD, real tick data goes back to 2010. Download it before running anything in real-tick mode or you'll be running on simulated ticks without knowing it.


The Metrics That Actually Predict Live Performance

MT5's backtest report shows dozens of statistics. Here are the ones that matter and โ€” more importantly โ€” what they're actually telling you.

Profit Factor (gross profit / gross loss) measures raw edge strength. A profit factor under 1.3 means the strategy barely covers its losses; a 10% adverse market shift will likely push it negative. Above 1.5 gives you margin for live conditions degrading from backtest. Above 2.5 โ€” examine carefully. Either the strategy is genuinely exceptional, or something in the backtest is hiding risk.

Recovery Factor (net profit / maximum drawdown) tells you how much you earn relative to your worst period. We target above 3.0 for client strategies. A recovery factor of 1.5 means you earned less than double your worst drawdown โ€” the risk-adjusted return is poor, and any drawdown that's slightly worse than the historical worst will dominate the return profile.

Sharpe Ratio โ€” Investopedia's explanation is useful here โ€” measures return relative to volatility. Above 1.0 is acceptable. Above 1.5 is genuinely good. We calculate this monthly for all live EAs we support.

Maximum Consecutive Losses is the metric most traders underuse. If the backtest had 14 consecutive losing trades at some point in five years, that is going to happen again on your live account. The question to ask: if 14 consecutive losses happen in the first two months, does your account survive? Is your psychological confidence in the strategy intact? If the answers are no โ€” reduce position size until both answers are yes.

Total trades โ€” backtest results on fewer than 200 trades are statistically thin. We've seen traders excited about a 3.2 profit factor on 40 trades. That's noise, not an edge.


๐Ÿค– Can This Strategy Be Automated?

In 2026, top traders run custom EAs โ€” not manual charts. We build MT4/MT5 Expert Advisors that execute your exact strategy 24/7, pass prop firm challenges, and eliminate emotional decisions.

  • Runs 24/7 โ€” no screen time, no missed entries
  • Prop-firm compliant (FTMO, MFF, TFT drawdown rules)
  • MyFXBook-verified backtest results included
  • From strategy brief to live EA in 2โ€“4 weeks

Curve-Fitting: The Silent Account Killer

Curve-fitting, or overfitting, is the process of finding parameter values that perfectly explain the past at the expense of any ability to predict the future. It's essentially teaching an algorithm to memorize history rather than understand it.

Here's how it happens: you have an EA with inputs for MA period, RSI threshold, ATR multiplier, session hours, and three other filters. You run MT5's genetic optimizer across 100,000 iterations. After optimization, your strategy shows a 3.1 profit factor on 2018โ€“2023 data. You deploy it live. It fails.

The optimizer found parameters that fit the specific noise pattern of that five-year slice. On any other five-year slice โ€” including the next one โ€” those parameters have no predictive power.

Signs you're looking at a curve-fit backtest:

The optimized parameters produce profit in a very narrow range (MA=47 works beautifully; MA=45 and MA=49 are losing). The strategy has 8+ optimized parameters but only 300 trades โ€” there's not enough statistical data to constrain 8 degrees of freedom. The equity curve is suspiciously smooth with no sustained drawdown periods. The profit factor is above 2.5 with no obvious reason why.

A robust strategy should show profit across a range of parameter values, not an isolated spike. After optimization, always perturb each parameter by ยฑ20% and re-run. If the performance collapses immediately in either direction, you're looking at curve-fitting.

The practical rule: optimize no more than one parameter per 30 trades in your sample. 300 trades โ†’ no more than 10 parameters. 150 trades โ†’ no more than 5. Most of our EA builds optimize 3โ€“5 parameters maximum.


Out-of-Sample Testing: The Only Honest Validation

This is the single practice that separates serious EA development from gambling with a polished interface.

The concept: take your full historical dataset and split it before you optimize anything. Let's say you have 10 years of data (2015โ€“2025). You reserve 2022โ€“2025 (30%) as your out-of-sample period โ€” you do not look at it, do not optimize on it, do not touch it until you have final parameters from the in-sample period (2015โ€“2022).

Once you've optimized your parameters on the in-sample period, you run those exact parameters โ€” no further adjustment โ€” on the out-of-sample period. What you see then is a genuine test: how does this strategy perform on data it has never been exposed to?

If the out-of-sample result shows:

  • Similar profit factor (within 20โ€“25% of in-sample): the strategy is robust
  • Lower absolute returns but consistent direction: expected and acceptable
  • Negative returns or dramatically different drawdown: overfit โ€” rebuild required

We run this process on every EA before showing a client results. We've rejected our own builds at this stage. It's not a comfortable process, but it's the only way to distinguish a real edge from a compelling fiction.


๐Ÿ“ˆ Stop Trading Manually โ€” Let AI Do It

While you sleep, your EA keeps working. Viprasol builds prop-firm-compliant Expert Advisors with strict risk management, real backtests, and live deployment support.

  • No rule violations โ€” daily drawdown, max drawdown, consistency rules built in
  • Covers MT4, MT5, cTrader, and Python-based algos
  • 5.0โ˜… Upwork record โ€” 100% job success rate
  • Free strategy consultation before we write a single line

Walk-Forward Optimization: Automating the Process

Walk-forward testing automates the out-of-sample validation across multiple rolling windows, giving you a statistically more robust view than a single split. MT5 has this built into the Strategy Tester.

The process: MT5 divides the test period into segments. For each segment, it optimizes parameters on the first portion, then runs those parameters on the following out-of-sample window. It rolls forward through the entire dataset and concatenates all the out-of-sample windows into a single walk-forward equity curve.

Two numbers to focus on in the walk-forward report:

Walk-forward efficiency โ€” the ratio of out-of-sample performance to in-sample performance. Above 50% is the baseline; above 70% is good. Below 30% and the strategy is probably curve-fit.

Consistency of out-of-sample windows โ€” if 8 out of 10 test windows are profitable and 2 lose, that's a coherent picture. If 5 windows are wildly profitable and 5 are losing, the strategy is only working in specific market regimes you can't reliably predict.

For a detailed walkthrough of the MQL5 Strategy Tester's walk-forward mode, the MQL5 documentation covers the configuration options thoroughly.


Monte Carlo: Understanding the Luck Component

Any backtest reflects one specific sequence of trades. In live trading, the sequence will differ โ€” not the trades themselves, but the order they occur. A strategy that would have survived its historical worst drawdown might fail if that drawdown happened in the first month rather than year three.

Monte Carlo simulation addresses this by randomly shuffling the trade sequence hundreds of times and computing performance metrics for each permutation. MT5 includes basic Monte Carlo in the Strategy Tester results panel.

What we look for in the Monte Carlo output: in 95% of simulated sequences, does the maximum drawdown stay below your prop firm's limit (or your personal limit)? If there's a 20% probability that a different order of the same trades blows a 10% drawdown limit โ€” your position sizing is too aggressive for a prop firm account, even if the average Monte Carlo outcome is profitable.


Forward Testing: The Final Gate

After backtesting, walk-forward, and Monte Carlo, there's still one more step before risking real money: forward testing on a live demo account.

This runs the EA in real market conditions โ€” real tick data, real spreads, real latency from your VPS to your broker โ€” but with simulated capital. Minimum 60 trading days. We recommend 90 for strategies with few trades per month.

What you're checking:

  • Does the EA execute as expected? Are fills happening at the expected price relative to entry signals?
  • Is the actual spread higher than the backtest assumed?
  • Does the drawdown pattern match the backtest's character, even if not the exact numbers?
  • Any unexpected behavior โ€” missed signals, double entries, stale handles after reconnection?

We've found issues during forward testing that the backtest couldn't surface: a broker's execution server with significantly higher latency than expected (killing a scalper that looked great in backtests), spread widening on GBP pairs during the 4pm London fix that the backtest averaged away, and an edge case in the daily drawdown tracker that fired incorrectly on the broker's day-rollover.

All fixable problems. Better to find them on a demo account.


How We Approach Backtesting at Viprasol

Every EA we deliver includes a full backtest package: verified real-tick data (quality above 97%), in-sample/out-of-sample split agreed with the client before testing begins, walk-forward report, and a Monte Carlo stress test. For prop firm EAs, we add the compliance simulation layer that checks firm-specific rule adherence day by day across the test period.

We've turned down client EAs at this stage when the results don't hold up. That's the right call โ€” deploying a strategy that won't survive live conditions helps nobody.

If you want a strategy developed and tested to this standard, talk to our team.


What to Do With These Numbers

A strong backtest report doesn't guarantee live performance. Markets change. Broker conditions change. Strategies degrade. What a rigorous backtest gives you is a justified basis for confidence โ€” and a reference point for knowing when live performance has deviated enough from the historical model to warrant investigation.

Track your live metrics monthly against the backtest. If your live profit factor is 1.6 and the backtest showed 2.1, that's normal degradation. If it's 0.8, something has changed โ€” and you want to understand what before it continues.


See also: Building a Profitable MT5 EA in MQL5 ยท Prop Firm EA Development

Sources: MQL5 Walk-Forward Testing Article ยท MQL5 Strategy Tester Documentation ยท Investopedia โ€” Backtesting

Share this article:

About the Author

V

Viprasol Tech Team

Custom Software Development Specialists

The Viprasol Tech team specialises in algorithmic trading software, AI agent systems, and SaaS development. With 100+ projects delivered across MT4/MT5 EAs, fintech platforms, and production AI systems, the team brings deep technical experience to every engagement. Based in India, serving clients globally.

MT4/MT5 EA DevelopmentAI Agent SystemsSaaS DevelopmentAlgorithmic Trading

Ready to Automate Your Trading?

Get a custom Expert Advisor built by professionals with verified MyFXBook results.

Free consultation โ€ข No commitment โ€ข Response within 24 hours

Viprasol ยท Trading Software

Need a custom EA or trading bot built?

We specialise in MT4/MT5 Expert Advisor development โ€” prop-firm compliant, forward-tested before live, MyFXBook verifiable. 5.0โ˜… Upwork, 100% Job Success, 100+ projects shipped.