Intrabar ambiguity (stop and target in the same bar)

Intrabar ambiguity is the uncertainty a bar-based backtest faces when a single bar's high and low reach both the stop and the target of a position: open, high, low and close do not say which level traded first. The convention chosen to resolve it can change a strategy's result substantially.

Senzoukria · Glossary · Updated September 2026


At a glance

Occurs when
Bar range covers both exit levels
More frequent with
Tight stops and targets relative to the bar range
Resolved exactly by
Tick data or a much finer timeframe
Senzoukria convention
Stop wins (least favorable outcome)

The problem

A long position enters at 100 with a stop at 98 and a target at 104. The next bar opens at 101, trades up to 105 and down to 97, and closes at 103. Both exits were touched, but the bar alone cannot tell whether price went to 105 first and then fell, or to 97 first and then rallied. One reading gives +4, the other −2. If thirty of three hundred trades land on such bars, the two conventions differ by 30 × 6 = 180 points on the same data.

The frequency of ambiguous bars grows as the exits get closer to each other relative to the bar's typical range. A scalping rule tested on 15-minute bars can have a large share of its trades decided by the convention rather than by the market.

Conventions in use

Ways to settle a bar that touched both exits
ConventionRuleEffect
PessimisticAssume the stop was hit firstUnderstates results when the order was favorable
OptimisticAssume the target was hit firstOverstates results; rarely reproduced live
Open-distance heuristicAssume price went first to the extreme nearer the openPlausible on average, wrong on individual bars
Finer dataReplay the bar with ticks or 1-minute barsResolves the order where the finer data exists

In Senzoukria

The automatic backtest engine tests stops and targets against each bar's high and low and, when one bar touches both, closes the trade at the stop. The rule is stated in the engine source and the documentation: without the ticks the order is unknown, so the outcome least favorable to the trade is taken. The excursion of that bar is recorded in the trade's MAE and MFE before the exit is applied. The Long and Short position tools on the chart apply the same order, checking the stop first. The prop firm rule engine goes one step further: when a drawdown rule's verdict depends on the unknown intrabar order, it marks the result indeterminate instead of guessing whether the account survived.

Because the backtest offers 1-minute, 5-minute, 15-minute and 1-hour granularities, the sensitivity of a strategy to the convention can be checked by running the same rule on a finer grain and comparing the results.

Common mistakes

  • Using a platform default without knowing which convention it applies.
  • Tightening stops and targets on coarse bars, which multiplies ambiguous trades.
  • Treating the pessimistic result as a guaranteed floor: slippage and gaps can still make it worse.

In the same section

This page in other languages

Frequently asked questions

Why not simply assume the level closer to the open was hit first?
It is a reasonable average guess, but on any individual bar it can be wrong, and the errors do not cancel if the strategy's entries are systematically placed near one side of the range. A conservative convention keeps the error on the side that does not flatter the result.
How can I tell whether my backtest depends on this convention?
Count the trades that exited on a bar touching both levels, or rerun the same rule on a finer timeframe. If the result changes materially, the strategy's edge is at least partly an artefact of how ambiguous bars were settled.

Keep reading