Backtesting
MT5 Strategy Tester Settings Explained: Every Field, and the Safest Choice for Each
By Benjamin Lee · Updated · 6 min read
The MetaTrader 5 Strategy Tester has about a dozen settings, and a wrong choice in any of them can make a weak Expert Advisor look excellent. The most common mistake is not a clever trick but a default left unchecked: the wrong modelling mode, a deposit that does not match your account, or a spread that no broker offers. This guide walks through the settings panel field by field, says what each one changes, and gives the safest choice for a test you can trust.
Key takeaways
- The modelling mode matters most. Use the mode based on real ticks for any serious test.
- Set the deposit, currency and leverage to match the account you will actually trade.
- Include a forward period and a long date range, so the result is not one lucky stretch.
- Add an execution delay. A test with ideal execution flatters scalpers.
- Optimisation finds the best settings for the past. It does not promise the future, so keep a period unseen.
Where the settings are
Open the Strategy Tester with Ctrl+R or View, then Strategy Tester. The Settings tab holds the fields described below, the Inputs tab holds the EA's own parameters, and the Agents and Journal tabs show what the tester is doing. Every field affects the report, so read the whole panel before you press Start. MetaQuotes documents the tester in its help pages on strategy testing.
Expert, symbol and timeframe
Choose the EA, the symbol and the chart period it was designed for. Using another timeframe is testing a different strategy. Make sure the symbol name matches your broker, including any suffix. If the history for the symbol is short or missing, the tester has to download it first, which can take time and may be limited by the broker. See historical tick data for MT5 for where the data comes from.
Modelling: the setting that matters most
| Mode | What it does | When to use it |
|---|---|---|
| Every tick based on real ticks | Replays ticks recorded by the broker, with the spread as it actually varied | Final tests of any EA, especially scalpers and anything that depends on spread |
| Every tick | Generates ticks from one-minute bars, with a fixed spread taken from each bar | Quick checks when real ticks are unavailable |
| 1 minute OHLC | Uses only the open, high, low and close of each minute | Faster tests of slower strategies; rough for anything intrabar |
| Open prices only | Runs the EA once per bar of the chosen timeframe | Fast early screening of EAs that act only on a new bar |
| Mathematical calculations | Runs calculations with no market data | Not for trading EAs |
MetaQuotes describes real ticks as tick data accumulated by the broker and the closest thing to real conditions. In generated modes, the tester uses a fixed spread from the minute bar and builds the ticks from the bar's volume. A mode that is fine for a bar-close trend EA can badly mislead a scalper. The MetaQuotes pages on tick generation explain each method.
Date range and the forward setting
A test needs enough history to include calm periods, trends, ranges and sharp news moves. Several years on a liquid symbol is a common minimum, though what counts as enough depends on how often the EA trades. A few months of a rising market proves little.
The Forward field splits the date range. The tester optimises on the first part and then shows how the best settings did on the remaining part, for example a quarter of the period. Forward results are not proof, but a strategy that falls apart in the forward part was probably fitted to noise. For a fuller treatment see walk-forward analysis in MT5.
Execution delay
The delay setting simulates the time between your EA's order and its fill. Zero latency, ideal execution is the most flattering choice, and live accounts never get it. For a scalper or a news EA, test with a delay of at least tens of milliseconds, and try a random delay too. If the result collapses, the edge depends on speed you probably will not have. A slower EA that acts once per bar is far less sensitive.
Deposit, currency and leverage
- Set the deposit to what you plan to trade. A test on 100,000 euros says little about a 1,000 euro account, because lot sizes, margin and the minimum lot all change.
- Use your account currency. A euro account converts profit and loss on dollar pairs, which changes results slightly.
- Set leverage to the real figure. For a retail account in the EU that is 30 to 1 on major pairs and 20 to 1 on gold, as covered in EA trading in Europe. A test at 500 to 1 hides margin problems that a grid EA would meet live.
- Check lot step and minimum lot in the symbol specification. The tester follows them.
Optimisation and its criteria
Optimisation runs the EA many times with different input values. The slow complete algorithm tries every combination. The fast genetic algorithm samples the space and evolves toward better results, which is quicker when there are many parameters. You also choose the criterion that decides what best means, such as balance, profit factor, expected payoff, drawdown or a recovery measure.
A safe setup to copy
Step 1: Choose the right EA, symbol and timeframe
Match the manual. Use your broker's symbol name.
Step 2: Select real ticks modelling
If the broker's tick history is incomplete, note that in the results and treat them with extra caution.
Step 3: Use several years of history
Cover different regimes: a trend, a range and at least one volatile news period.
Step 4: Set the forward period
Hold back part of the history, for example one quarter, to see out-of-sample behaviour.
Step 5: Add a realistic execution delay
Use a delay in milliseconds, and compare it with an ideal run.
Step 6: Match deposit, currency and leverage to your account
Do not test with a bigger balance than you will use.
Step 7: Run once, read the report, change one thing, run again
Record each change. See how to read the report.
Mistakes that flatter a test
- Open prices only for a scalper, which hides all intrabar behaviour.
- A spread of zero or a tiny fixed spread in generated ticks.
- A huge deposit that never faces margin pressure.
- A date range that begins after a bad period or ends before one.
- Optimising and judging on the same period.
- Ignoring commission, which a raw-spread account charges per lot.
For the whole process from test to live account, follow how to backtest an EA in the MT5 Strategy Tester, then the MT5 Expert Advisors guide.
Sources and further reading
- MetaTrader 5 Help: Strategy TestingThe Strategy Tester: testing modes, settings and forward testing.
- MetaTrader 5 Help: Real and Generated TicksThe difference between ticks recorded from the broker and ticks the tester generates.
- MetaTrader 5 Help: Strategy OptimizationHow optimisation and forward testing work in the Strategy Tester.
- MetaTrader 5 Help: Testing ReportWhat each figure in the tester's report means, including drawdown.
Frequently asked questions
Which modelling mode should I use in the MT5 Strategy Tester?
Use every tick based on real ticks for serious tests. It replays the broker's recorded ticks and spreads. Faster modes suit early screening of slow EAs but can mislead scalpers and spread-sensitive strategies.
Why do my backtest results change when I change the deposit?
Lot size, margin use and rounding to the minimum lot depend on the balance. An EA that uses risk percentage behaves differently on a small account than on a large one.
What does the Forward setting do?
It reserves the last part of the date range for a forward test. The tester optimises on the earlier part and shows how the chosen settings performed on the later part, which helps expose overfitting.
Should I add an execution delay to a backtest?
Yes, especially for scalpers and news EAs. Ideal execution is not available live. If a delay of tens of milliseconds ruins the result, the strategy depends on speed that a retail connection may not provide.
Can I trust an optimised result?
Treat it as a hypothesis. Check that the settings sit in a stable region, test them on unseen data and then forward test on demo before any live use.
Expert Advisors in these styles
Apply the checks above to any of these before you buy: read the manual, run your own backtest, and start on demo.
Keep reading
- BacktestingHow to Backtest an EA in MT5 ProperlyLearn how to backtest an Expert Advisor in MT5 the right way: tester modes, spreads, delays, optimisation, walk-forward checks and the red flags to avoid.
- BacktestingHow to Read an MT5 Backtest ReportLearn to read an MT5 Strategy Tester report line by line: drawdown, profit factor, Z-score, trade quality, robustness checks and the red flags that expose a weak EA.
- Data qualityHistorical Tick Data for MT5 BacktestsCompare sources of forex and gold tick data for MT5: broker real ticks, Dukascopy, Tickstory and paid vendors. Learn to clean, import and verify data quality.
- Pillar guideMT5 Expert Advisors: The Complete Guide for BeginnersEverything about MetaTrader 5 Expert Advisors in one place: how they work, strategy types, risk, backtesting, buying safely, gold, EURUSD, prop firms and Europe.


