ForexCopilotEA

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

Tester modelling modes
ModeWhat it doesWhen to use it
Every tick based on real ticksReplays ticks recorded by the broker, with the spread as it actually variedFinal tests of any EA, especially scalpers and anything that depends on spread
Every tickGenerates ticks from one-minute bars, with a fixed spread taken from each barQuick checks when real ticks are unavailable
1 minute OHLCUses only the open, high, low and close of each minuteFaster tests of slower strategies; rough for anything intrabar
Open prices onlyRuns the EA once per bar of the chosen timeframeFast early screening of EAs that act only on a new bar
Mathematical calculationsRuns calculations with no market dataNot 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.

  1. Step 1: Choose the right EA, symbol and timeframe

    Match the manual. Use your broker's symbol name.

  2. 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.

  3. Step 3: Use several years of history

    Cover different regimes: a trend, a range and at least one volatile news period.

  4. Step 4: Set the forward period

    Hold back part of the history, for example one quarter, to see out-of-sample behaviour.

  5. Step 5: Add a realistic execution delay

    Use a delay in milliseconds, and compare it with an ideal run.

  6. Step 6: Match deposit, currency and leverage to your account

    Do not test with a bigger balance than you will use.

  7. 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

  1. MetaTrader 5 Help: Strategy TestingThe Strategy Tester: testing modes, settings and forward testing.
  2. MetaTrader 5 Help: Real and Generated TicksThe difference between ticks recorded from the broker and ticks the tester generates.
  3. MetaTrader 5 Help: Strategy OptimizationHow optimisation and forward testing work in the Strategy Tester.
  4. 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.

Browse Expert Advisors