Testing Guide

How to Backtest an MT5 EA

A backtest is evidence, not proof. Use clean data, realistic costs and out-of-sample tests before trusting a generated EA.

Updated 2026-11-04 · Free builder guides · No signup required

Start with clean data

Backtest quality is capped by data quality. Check duplicate timestamps, gaps, OHLC violations and zero spread/volume before trusting the result. Use the data quality reports or the quality API.

Choose the right modelling mode

  • Every tick based on real ticks for intrabar-sensitive EAs.
  • 1 minute OHLC for faster rough tests.
  • Open prices only for simple bar-open systems.

Always include spread and commission. A strategy that only works at zero spread is not a strategy.

Avoid overfitting

  • Do not optimise and validate on the same data.
  • Use walk-forward windows.
  • Limit the number of optimised parameters.
  • Check trade count, drawdown and expectancy, not only net profit.
  • Test across different market regimes.

Backtest Guide FAQ

How long should I backtest?

Long enough to include different volatility regimes. More importantly, keep an untouched out-of-sample period.

Are real ticks necessary?

For intrabar logic, yes. For simple bar-close systems, 1-minute OHLC may be enough for a first pass.

Can a backtest guarantee live results?

No. Execution, slippage, latency and market changes can differ.

🚀 Invite friends — Earn $5 You both get $5 credit on Go Ad · opencode.ai AI-Powered Coding Agent — Try Free Build apps, fix bugs & ship faster with opencode. Get $5 free credit when you join. × Ad · quo.com QuoPhone — $20 Visa Gift Card Free Sign up to Quo, subscribe 3 months, get a $20 Visa gift card. Atif's referral gift for you. ×