M5 bar touches both the 10 pip stop and the 10 pip target: what each tester mode decides
The MT5 strategy tester offers several modelling modes: Every tick, Every tick based on real ticks, 1 minute OHLC and Open prices only. For tight stops the choice changes results more than most parameters do.
Example. A long in EURUSD from 1.0850 on an M5 bar, stop at 1.0840, target at 1.0860. The bar prints open 1.0850, high 1.0863, low 1.0837, close 1.0852. Both levels were touched, and OHLC data does not record which came first.
Open prices only reads one price per bar, so it is not designed to answer the question. 1 minute OHLC looks at the M1 bars inside the M5 bar, which settles the order unless one M1 bar touched both levels. Every tick builds ticks from M1 data, so the order inside a minute is modelled. Every tick based on real ticks uses the broker's recorded ticks, and that is the only mode where the order is something that actually happened.
How much it matters depends on frequency. Take 400 trades with 10 pip stops and targets, and suppose 6% of them have a bar touching both levels. That is 24 trades. If the tester gave them all the target the result is +240 pips, and all stops gives -240 pips. The range is 480 pips before spread, from trades the model can only guess.
M5 bar touches both the 10 pip stop and the 10 pip target: what each tester mode decides
-
FXS HongKong Scalper
- Posts: 407
- Joined: Sat Oct 24, 2026 10:15 pm
Re: M5 bar touches both the 10 pip stop and the 10 pip target: what each tester mode decides
That example is the clearest way to show why tight stops need tick data in the tester. With 1 minute OHLC, the tester guesses an order inside each M1 bar, and with stops of a few pips that guess can decide the outcome. Every tick based on real ticks is slower, but it is the only mode I trust for scalping systems. Comparing results between modes is a good test: if they differ a lot, the strategy depends on intrabar order.
FXS Official Team | Hong Kong Session Desk
Re: M5 bar touches both the 10 pip stop and the 10 pip target: what each tester mode decides
A result is only reliable if it survives a change of mode. Run the same EA on 1 minute OHLC and on real ticks, and compare. Say the total comes out at +120 pips on 400 trades in the first and -80 pips in the second. The 200 pip difference is bigger than the whole edge, which says the strategy lives in the noise that OHLC cannot resolve. Those numbers are made up for illustration, but the check is real. If the totals stay within a few percent of each other, the intrabar ordering is not what produces the edge. If they differ by more than the average expected profit, treat the faster mode as the honest one.
It’s Fairman 
Re: M5 bar touches both the 10 pip stop and the 10 pip target: what each tester mode decides
The spread adds a second trap when you build your own backtest from bar data. Chart candles are normally built from bid prices. A long exits at the bid, so a long target of 1.0860 is hit when the bid high reaches it. A short exits at the ask, which is the bid plus the spread. With a 1.2 pip spread, a short target at 1.0840 is hit only when the bid low reaches 1.08388. A bar with a low of 1.0839 touches the target on the bid chart but does not fill the short. In a spreadsheet or Python test that ignores this, the shorts get target hits 1.2 pips early, and the total flatters the shorts against the longs.
It’s Fairman 
Re: M5 bar touches both the 10 pip stop and the 10 pip target: what each tester mode decides
To see how the tester decided, pick twenty ambiguous trades from the log and check each on a tick chart, or on M1 bars if that is all you have. Suppose 13 of the 20 hit the stop first and the tester had scored 18 of them as targets. Then you know the direction of the error. That sample is only 20, so treat the 65% as a hint, not a measurement. Also look at how the ambiguous trades are spread over the day. If they cluster around the 13:30 London release, the cause is volatility at the news, and a rule to skip those minutes may remove most of the uncertainty along with the risk.
It’s Fairman 
Re: M5 bar touches both the 10 pip stop and the 10 pip target: what each tester mode decides
Open prices only is still useful, for the right kind of strategy. If the EA acts once per bar on H1 or H4 and uses stops of 2 or 3 ATR, intrabar ordering rarely decides a trade, and the mode runs a multi year test in minutes where a tick test can take much longer. The choice follows the stop size against the bar size. A rough rule: the closer the stop and target are to the typical range of the bar you test on, the more tick data you need. A stop of 40 pips on an H1 chart with an average range of 25 pips needs little help. A stop of 5 pips on M5 with a range of 6 pips needs the best data you can get.
It’s Fairman 
-
Shadow Trader
- Posts: 5438
- Joined: Wed Sep 09, 2026 5:19 pm
Re: M5 bar touches both the 10 pip stop and the 10 pip target: what each tester mode decides
Backtest results assume a clean sequence: price hits the target, or it hits the stop. In live trading, both can be touched within a single second, and the order of events decides the outcome.
On volatile pairs during news, a 2 pip target and a 2 pip stop sit very close together. A spike can go through one and then the other, and the broker's server processes whichever it saw first. The trade history only shows the one that executed.
This is the part of live trading that no backtest reproduces. Which fill came first depends on server timing, the order of messages, and sometimes whether the broker's engine checks stops before targets.
Some engines process stops before limits when both trigger together. That bias is small but consistent, and over many trades it adds up.
A simple test: take a sample of trades where the bar's range exceeded both levels. Compare how often the live outcome was the stop versus the target, and then compare that with the backtest's assumption.
If the live results lean toward stops, it explains a lot of the gap between test and reality.
When stop and target are both inside one bar, do live logs lean toward the stop, or does it even out?
On volatile pairs during news, a 2 pip target and a 2 pip stop sit very close together. A spike can go through one and then the other, and the broker's server processes whichever it saw first. The trade history only shows the one that executed.
This is the part of live trading that no backtest reproduces. Which fill came first depends on server timing, the order of messages, and sometimes whether the broker's engine checks stops before targets.
Some engines process stops before limits when both trigger together. That bias is small but consistent, and over many trades it adds up.
A simple test: take a sample of trades where the bar's range exceeded both levels. Compare how often the live outcome was the stop versus the target, and then compare that with the backtest's assumption.
If the live results lean toward stops, it explains a lot of the gap between test and reality.
When stop and target are both inside one bar, do live logs lean toward the stop, or does it even out?