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
Test When Stop and Target Hit in One Candle on a perpetual chart; no account is needed to chart.
Launch ChartsPodResolution options
| Method | Accuracy | Cost |
|---|---|---|
| Assume stop first | Conservative | May understate |
| Assume target first | Optimistic | Overstates |
| Use lower-timeframe bars | Better | More data |
| Use trade data | Best | Most data |
Report it
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 terminalQuestions 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.
- 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.