MetaTrader 5
Backtesting on MetaTrader 5
Short guide: run your first MT5 backtest
This walkthrough shows how to open the Strategy Tester, pick your Expert Advisor (EA) or indicator, set parameters and data, and review results.
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 the separate guide: 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.