LEARN · EN · easyquanttrading.com

How to backtest in MT5: settings that change the answer

The Strategy Tester in MetaTrader 5 is a capable tool and it will happily produce a beautiful equity curve from settings that could never happen in a live account. The difference between a backtest that informs a decision and one that misleads you is a handful of settings and one quality check, and both take a few minutes. This is the order to do them in.

By the EasyQuant Research Team·Published 2026-09-26·We publish the tests our own strategies fail. Nothing here is a return promise.

Before anything else: check the data

A backtest is only as good as the bars behind it, and MT5's default download is often sparse. Open the History Center (F2) and look at what you actually have for your symbol and timeframe. If you are testing an hourly strategy, having daily bars is not enough.

Then run the test once and read the report header, which states the quality percentage and the number of bars and ticks used. Treat a quality figure below about 90% as a warning that the tester is filling gaps with an approximation. The reported result may still be directionally useful, but it is not a precise measurement, and it should not be the basis for position sizing.

Also check the date range. A test that starts when the symbol's data starts is not the same as a test over a period you chose, and the two can give very different impressions — particularly on instruments that trended for years.

The modelling mode is the setting that matters

MT5 offers several modelling modes. In order of increasing realism: Open prices only, 1 minute OHLC, Every tick, and Every tick based on real ticks.

**Open prices only** evaluates your logic once per bar, at the open. It is fast and it is fine for strategies that make decisions at bar close and hold for many bars. It is meaningless for anything that manages positions inside a bar, because the tester cannot see the intrabar path at all — your stop and target both get evaluated against a bar that only has four numbers in it.

**1 minute OHLC** uses minute bars to approximate the intrabar path. Better, still an approximation, and it can be optimistic when your stop and target sit close together.

**Every tick** generates synthetic ticks from the available data. **Every tick based on real ticks** uses the broker's recorded tick history where available, which is the closest to what actually happened.

The practical rule: if your strategy acts inside a bar, use real ticks. If your strategy decides at bar close and holds for days, 1 minute OHLC is usually adequate and much faster. And whatever you choose, run the same test twice with two different modes — if the results are materially different, your strategy depends on intrabar behaviour, which is the behaviour a live account will resolve against you as often as for you.

Spread, commission and swap

The tester's default spread is whatever the broker currently reports, which on a quiet Sunday evening is nothing like the spread during a news release. Set it manually to a realistic worst case rather than leaving it on current.

Commission is not included by default on many accounts. Enter it, in the units your broker charges, and check the report to confirm it is being applied. A strategy with 800 trades can lose a large share of its edge to commission, and the effect is invisible if the field is empty.

Swap matters for anything held overnight. For a strategy that holds positions for days, swap over a year can exceed the spread costs. Look up the current swap rates for your symbol and enter them rather than leaving them at zero.

For long-only or long-biased strategies there is a further asymmetry worth knowing: on many instruments the long side pays the negative swap, so the cost applies consistently in one direction rather than averaging out.

Settings that quietly change the result

**Deposit, leverage and lot size.** The tester uses these to compute margin and to decide whether a position can be opened. If your lot size is unrealistically large relative to the deposit, the test may run out of margin in places a live account would not, or conversely never feel any constraint. Set the deposit to something like your real account, and let the position sizing logic be the thing that varies, not the deposit.

**Optimisation versus forward testing.** The optimiser searches parameter space and reports the best combination. That result is a maximum over many trials and is biased upward by construction. If you use it, the number it produces is not a performance estimate — it is a candidate, and it needs forward testing before it means anything.

**Modelling of delays.** Execution delays and requotes are not simulated. A strategy whose edge depends on filling at the exact signal price will lose part of that edge live and the tester will not show it.

**The tester's own arithmetic conventions.** Whether a bar that touches both stop and target is treated as a win or a loss is an assumption built into the modelling, not a fact about the market. On a bar where both are touched, the tester picks one.

A checklist before you believe a number

1. History quality above roughly 90%, on the timeframe you are trading, over a period you chose deliberately.

2. Modelling mode matched to how the strategy acts — real ticks if it acts inside a bar.

3. Spread set to a realistic worst case, not the current value.

4. Commission and swap entered, and confirmed as applied in the report.

5. Position sizing that reflects how you would actually size, including the minimum lot constraint of your account.

6. A trade count large enough that the result can distinguish anything from luck.

7. The same test run on a second period or a second broker feed, to see whether the result survives a change of sample.

8. A real-terminal forward test on the same instrument before any money is involved. We run this on every strategy we publish, and of 1,315 strategies in our verification record, 631 could not be run on that terminal and are reported separately rather than counted as either passes or failures. Of those that could be compared, the majority verified but a meaningful minority came out weak, failed, diverged or mismatched.

That last item is not a formality. A backtest and a live terminal are different programs reading different feeds, and the difference between them is measurable.

What an MT5 backtest cannot tell you

It cannot tell you your win rate will hold. It reports what happened on the bars you gave it, and the inputs are the ones you chose.

It cannot model the market impact of your own orders, which matters at size and does not at retail size — know which situation you are in.

It cannot tell you about execution you have not experienced: partial fills, rejected orders, weekend gaps, or a broker that widens spreads beyond anything in your history.

And it cannot tell you whether the strategy will keep working. It can tell you whether the result you are looking at is robust to the settings you can control, which is a smaller and more defensible claim — and the one worth testing for.

Current platform facts

Read live from the strategy library when this page was generated. These are the same counts published on our transparency page, and they change as strategies are added and rejected.

Strategies in the audited library3672
Flagged by the audit2011
Flag rate54.8%
Checks still pending1651
Passed the DSR overfitting check1
Passed the significance check504
DSR threshold used0.90

FAQ

Which modelling mode should I use in the MT5 Strategy Tester?
Use 'Every tick based on real ticks' if your strategy acts inside a bar or manages stops and targets intrabar. 'Open prices only' is acceptable only for strategies that decide at bar close and hold for multiple bars, and it cannot see intrabar behaviour at all.
Is MT5 backtesting accurate?
It is as accurate as your history quality and settings allow. Check the quality percentage and bar count in the report, set spread, commission and swap explicitly, and choose a modelling mode that matches how the strategy acts. Even then it models a simulation, not the live market.
Why is my MT5 backtest not working or giving no results?
The most common causes are missing history for the symbol and timeframe (check the History Center), a date range outside the available data, or an expert advisor that cannot trade in the tester (some use functions the tester does not support). The report header usually states which.
Should I use the MT5 optimiser?
It is useful for rejecting parameter regions, not for selecting a winner. The best result is a maximum over many trials and is biased upward by construction, so treat it as a candidate and forward test it rather than as a performance estimate.
How do I backtest with real tick data in MT5?
Select 'Every tick based on real ticks' as the modelling mode and make sure the broker supplies tick history for your symbol and period; download it in the History Center first. If real ticks are unavailable the tester falls back to generated ones, which the report indicates.

More guides

Not investment advice. Historical results do not guarantee future performance. EasyQuant is a research factory — you execute on accounts you control.

How to backtest in MT5: settings that change the answer