← All articles

March 2026

How to Run a Backtest in MT5 Strategy Tester (Step-by-Step)

A professional-grade guide to running backtests in MetaTrader 5 — the right settings, common mistakes, and how to read what the results are actually telling you.


You've built your first Expert Advisor. You have a strategy you believe in. But in algorithmic trading, belief is not a competitive advantage — evidence is.

Phase 1: Opening the Strategy Tester

Open MT5 and press Ctrl+R, or go to View → Strategy Tester. For your first run, select the Single tab — this tests one specific set of parameters rather than running a multi-variable optimisation.

Phase 2: Configuring Your Settings Correctly

This is where most traders produce unreliable results without realising it.

- **Symbol and Timeframe**: Choose the exact instrument and period your strategy is designed for. - **Date Range**: Test at least 2–3 years of data. Testing the last three months is not a strategy validation — it's a lucky streak. - **Modeling**: Always select Every tick based on real ticks. - **Deposit and Leverage**: Set these to match your actual account.

Phase 3: Reading Your Results

The key metrics to evaluate: Net Profit, Profit Factor (target ≥ 1.5), Maximum Drawdown (keep under 20%), Win Rate, and Sharpe Ratio.

Common Mistakes

Look-ahead bias, curve-fitting, fixed spread testing, and insufficient date range are the four most common reasons a backtest lies to you.

StratForge generates MetaEditor-ready MQL5 Expert Advisors through a conversational AI process that includes a structured review pass for all six common error categories. If your EA fails the backtest, paste the results back in for AI diagnosis and a revised iteration.


Build your Expert Advisor with StratForge

Answer 7 questions. Generate MetaEditor-ready MQL5 in real time. Backtest and iterate with AI diagnosis. Free to start.

Start building free →