BACKTESTING · AMBIGUITY

When Stop and Target Hit in One Candle: Backtest Fill Ambiguity

A candle's high reached your target and its low reached your stop. Which happened first? OHLC data cannot say.

Short answer

When both stop and target fall within one candle's range, OHLC data does not reveal the order in which they were hit. Backtests must assume an order: the conservative choice assumes the stop hit first; an optimistic one assumes the target. Better, resolve ambiguity with lower-timeframe or trade data for those bars. Report how many trades were ambiguous and how results change under each assumption; if results depend heavily on it, the strategy's stops and targets are too tight for the bar size.

The problem

One candle, two possible pathsOne candle, two possible paths: OPEN 100: Entry; PATH A: High 103 first → target hit; PATH B: Low 98 first → stop hit; CLOSE 101: OHLC can't tell.OPEN 100EntryPATH AHigh 103 first → target hitPATH BLow 98 first → stop hitCLOSE 101OHLC can't tell
Same OHLC, opposite trade outcomes. Original ChartsPod editorial graphic.

Test When Stop and Target Hit in One Candle on a perpetual chart; no account is needed to chart.

Launch ChartsPod

Resolution options

MethodAccuracyCost
Assume stop firstConservativeMay understate
Assume target firstOptimisticOverstates
Use lower-timeframe barsBetterMore data
Use trade dataBestMost data
Illustrative return by ambiguity rule (%)Illustrative return by ambiguity rule (%): Target first +31 %; Lower-timeframe resolved +12 %; Stop first +7 %.ILLUSTRATIVE RETURN BY AMBIGUITY RULE (%)Target first+31 %Lower-timeframe resolved+12 %Stop first+7 %
The truth is usually between the extremes. Original ChartsPod editorial graphic.

Report it

Ambiguity reportingAmbiguity reporting: Count of ambiguous trades; Rule used; Results under both extremes; Resolution with finer data if available; Stop/target size vs typical bar range.AMBIGUITY REPORTINGCount of ambiguous tradesRule usedResults under both extremesResolution with finer data if availableStop/target size vs typical bar range
Heavy dependence means the bar size is too coarse for the plan. Original ChartsPod editorial graphic.

Related: Bar-Close Signals vs Next-Bar Fills: Why Backtest Returns Change, Stop-Loss Trigger vs Fill Price: Plan for Slippage in Fast Markets.

Design to reduce ambiguity

If many trades are ambiguous, the stop and target are small relative to the bar range. Options: test on a lower timeframe so bars are smaller than the stop distance; widen stop and target; or use bar-close exits instead of intrabar levels. Each changes the strategy, so retest fully rather than adjusting results.

Conclusion

Resolve same-candle stop/target ambiguity with finer data or conservative assumptions, and report its impact.

See When Stop and Target Hit in One Candle on live data in the free ChartsPod terminal.

Open the ChartsPod terminal

Questions readers ask

Which hit first, stop or target?

OHLC can't tell; use finer data or a conservative rule.

What is the conservative assumption?

Stop first.

How do I avoid ambiguity?

Use lower-timeframe data or stops/targets wider than typical bar ranges.

Sources and methodology

Backtesting principles follow TradingView's Pine Script documentation on strategies, repainting and non-standard charts, and ChartsPod's strategies-and-backtests guide summary, as read on 17 October 2026. All numbers are illustrative and do not describe a real strategy's performance.

  1. TradingView Pine Script: Strategies — simulated fills and assumptions.

This article explains research tools and workflows. It is not financial advice, does not recommend buying or selling any asset and does not predict prices. Crypto derivatives carry a risk of rapid and total loss of margin.

CHARTSPOD EDITORIAL EDITION · RESEARCH AND EDUCATION ONLY · NOT FINANCIAL ADVICE.