Backtesting in the MetaTrader 5 Desktop App
This guide covers the Strategy Tester inside the MetaTrader 5 desktop app, the official tool from MetaQuotes that ships with MT5. It's the tool to use when you want to run optimizations, walk-forward tests, or test against the broker tick data installed on your machine.
1) Open the Strategy Tester
- In MT5, go to View → Strategy Tester (or press Ctrl+R).
- The Strategy Tester panel appears (usually docked at the bottom). If it’s floating, you can drag it to dock.
2) Select what to test
In the Strategy Tester, choose the tested object and basic parameters:
- Tested object: select your Expert Advisor (EA). If you’re evaluating an indicator, choose Indicator (where supported) or use an EA that applies the indicator logic for backtesting.
- Symbol & timeframe: pick the market (e.g., EURUSD) and timeframe (e.g., H1).
- Date range: set the period you want to test.
- Model: Every tick (most precise) or 1-minute OHLC/Every tick based on real ticks if available.
- Deposit & currency: optional but useful for money‑management metrics.
- Visualization: turn on if you want to watch trades play out on a chart in real time.
3) Configure inputs
Click Inputs (or Inputs/Parameters tab) to set your EA/indicator parameters:
- Set lot size, risk, or any strategy variables.
- Leave Optimization off for a single backtest run. Enable later if you want to search for best parameters.
4) Run the backtest
- Click Start to begin.
- If Visualization is enabled, a chart window opens showing orders/positions in real time during the test.
- When finished, review the tabs:
- Results: list of trades and operations
- Graph: equity/balance curves
- Report: summary stats (profit factor, drawdown, etc.)
- Journal: logs and error messages
5) Data considerations
Backtests depend on data quality. If you need higher-quality tick data, see Getting MT5 tick data.
Troubleshooting
- Strategy Tester not visible: View → Strategy Tester; ensure you are in MT5 terminal, not MetaEditor.
- EA not listed: recompile in MetaEditor; confirm it’s an Expert Advisor placed under
MQL5/Experts. - No trades: widen the date range, change timeframe, verify inputs, and check Journal for errors.
- Sluggish visual mode: turn off Visualization or reduce the speed slider.
Next steps
- Iterate inputs and compare reports.
- Try Optimization to search parameter combinations.
- Move from demo to live only after robust testing and risk checks.
Related guides
- One-click MT5 backtesting: run a real MT5 backtest in the browser, no install needed
- Backtesting in Horizon: prove the idea first, then export
- Getting MT5 tick data: 100% tick quality in the desktop tester
- Using the Journal: read Strategy Tester errors
- Intro to MetaEditor: compile the EA first
- Setting up MetaTrader 5: install MT5
- Backtesting Metrics Explained: profit factor, Sharpe, drawdown