Skip to content
← Learning hub
Research Methods / Research note

When stop and target share the same candle

A worked OHLC example shows why intrabar order assumptions can change a backtest result.

Edge Quant editorial · 28 October 2026 · About 4 minutes

A candle can touch both your stop and your target. Its high and low alone do not tell you which exit happened first. That missing sequence is a research assumption worth recording.

Published 31 October 2026. Original educational example; no market dataset or historical backtest is used.

One candle, two possible outcomes

Assume an existing long position entered at 100, with an active stop at 98 and target at 103 before this candle begins. The candle opens at 100, reaches a high of 104 and a low of 97, and closes at 101. Assume full fills at the order prices, no gaps, and cancellation of the other exit immediately after a fill.

  • Path A: 100 → 104 → 97 → 101. The target is reached first: gross profit is 3 per unit.
  • Path B: 100 → 97 → 104 → 101. The stop is reached first: gross loss is 2 per unit.

Both paths have identical OHLC values. The outcome differs by 5 per unit. For 10 units, that is +30 versus −20 before costs. With a hypothetical total round-trip cost of 2 for the entire position, the outcomes become +28 and −22. These are arithmetic scenarios, not measured returns.

Make the simulator's choice explicit

TradingView documents an assumed intrabar price path for its broker emulator and a Bar Magnifier option using lower-timeframe data. Record the setting and available intrabar coverage with your results. More detailed bars can reduce ambiguity, but do not establish your broker's actual execution, queue priority or liquidity.

A small audit you can apply

  1. Identify bars where both active exit levels fall inside the observed range.
  2. Separate positions already open at the start from entries created within that bar. For a new entry, exits cannot execute before the position exists.
  3. Count ambiguous bars and retain their timestamps, order activation times and prices.
  4. Recalculate those cases under stop-first and target-first assumptions, keeping every other rule identical.
  5. Inspect lower-timeframe data where available, and report unresolved cases.

These two scenarios are a sensitivity exercise, not universal performance bounds: an earlier exit may change later entries, sizing and the entire equity path. Rerun the full event sequence if subsequent decisions depend on the outcome.

A stop price is not a guaranteed fill

The toy example excludes gaps. In an execution model that permits a market stop to fill at the next available price, a jump through 98 can produce a worse exit. Limit-order fills also need an explicit rule: a touched price alone is not evidence of available size or priority. Document your assumptions rather than treating the candle range as an execution record.

Add these fields to the research log

  • Instrument, timezone, timeframe and data source.
  • Entry and exit activation timestamps; stop and target prices.
  • Intrabar data availability and simulator settings.
  • Gap, spread, slippage, commission and partial-fill assumptions.
  • Ambiguous-case count and sensitivity of final results.

Primary documentation checked 31 October 2026; see the reference below. All numerical paths above are original hypothetical examples.

Primary references

References reviewed 28 October 2026. Original exercises and project-specific observations are identified separately.

Keep exploring

Review the backtest checklist ↗

Educational engineering and research guidance. Examples do not establish a profitable or live-ready trading strategy.