Matana Labs

Stop loss or take profit first? How often bars can't tell

When a stop loss and a take profit both fall inside one bar, a bar-based backtest cannot know which was hit first. We simulated 160,346,000 bracket trades on 421 instruments and checked each one against second-level data. On daily bars, 41% of ±0.5% brackets were ambiguous, and assuming the target came first made the same trades look several basis points better per trade than they really were.

Key findings

Ambiguity rate by bracket width and bar size, US stocks and ETFs
Ambiguity rate by bracket width and bar size, US stocks and ETFs

What guessing is worth

An ambiguous bar is a coin the backtester has to flip. The heuristic flips it fairly but often wrong; "target first" always calls it in the trader's favour. Over many trades the second turns a strategy with no edge into one that looks profitable on paper.

Expectancy overstatement per trade of bar assumptions, ±0.5% bracket
Expectancy overstatement per trade of bar assumptions, ±0.5% bracket

Ambiguity rate by bar size, US stocks & ETFs

Bracket (stop / target)1-minute5-minute15-minute1-hourDaily (entry at the open)
−0.1% / +0.1%2.8%13.0%28.4%53.0%79.2%
−0.25% / +0.25%0.5%3.2%8.9%24.2%62.9%
−0.5% / +0.5%0.1%0.8%2.9%10.0%41.1%
−1% / +1%0.0%0.2%0.8%3.7%20.5%
−2% / +2%0.0%0.0%0.2%1.1%9.1%
−0.25% / +0.5%0.2%1.5%4.7%14.8%50.8%
−0.5% / +1%0.0%0.4%1.4%5.5%27.8%
−1% / +2%0.0%0.1%0.3%1.7%12.2%

By segment

Segment1-minute, ±0.25%5-minute, ±0.25%Daily, ±1%Heuristic wrong when ambiguous (1-minute, ±0.25%)
US stocks & ETFs0.49%3.2%20.5%35%
Crypto1.43%7.3%56.6%48%
FX & spot metals0.03%0.1%3.5%28%

Crypto bars are ambiguous far more often: the instruments are volatile and many are thin altcoin pairs with noisy prints. FX moves less inside a bar, so its brackets are rarely ambiguous at these widths.

Method

Question. For a trade with a stop loss and a take profit, how often does the bar that ends the trade contain both levels, and what does each way of guessing cost?

Trades. Long entries at the session's first second and every 30 minutes up to 90 minutes before the close (every 2 hours for 24-hour instruments). Stop and target sit at fixed percentages from the entry: symmetric ±0.1, 0.25, 0.5, 1 and 2%, and asymmetric 0.25/0.5, 0.5/1 and 1/2%. Trades without a hit close at the session close.

Truth and bars. The truth is the first second whose price reaches either level. Intraday bars are anchored at the entry, so the entry is a bar's open; daily bars take the entry at the open only. A trade is ambiguous when the first bar that touches either level touches both. The heuristic assumes the extreme closer to the bar's open came first; target first assumes the take profit did.

Measures. Ambiguity rate = ambiguous trades / trades that hit a level. Expectancy is in basis points of the entry price, before costs. Confidence intervals are 95% CI from a bootstrap over instruments (1,000 resamples, seed 20261120).

Data coverage

SegmentInstrumentsSecond-level data usedMedian history (min to max)SessionsNotes
US stocks & ETFs2952003-09-10 to 2026-11-1920.8 years (1.8 to 23.2)1,249,52225 sessions excluded by data checks; 301 split adjustments (69 uncertain)
Crypto932013-11-01 to 2026-11-195.5 years (2.0 to 13.0)198,978470 sessions excluded by data checks; 146 split adjustments (120 uncertain)
FX & spot metals332009-09-24 to 2026-11-1917.2 years (3.1 to 17.2)167,3602 split adjustments (0 uncertain)

The first and last session of every instrument are in data-coverage.csv.

Limitations

How the engine behind this study fills orders and charges costs: order execution model, costs and the engine validation.

Reproduce it in Matana Labs

Matana Labs checks stops and targets every second, so a backtest never has to guess which came first (how second-by-second fills work). Build a bracket strategy in Strategy Lab, run it in Backtest Lab and read each trade's exit time to the second in the trades list. To get a feel for how fast a bracket resolves, play a past day second by second in market replay. The aggregated results of this study are below, under CC BY 4.0.

Reproduce this test in Matana LabsOpens Strategy Lab in the app. Sign in or create an account on the free Explore plan first.

Open Strategy Lab

Download the summary data

Aggregated statistics only, no price series and no trade lists. Licence: CC BY 4.0; please credit Matana Labs.

Columns of ambiguity.csv (Stop or target first)
  • entries: simulated bracket trades (long)
  • resolved: trades where stop or target was hit before the session close
  • ambiguous: trades whose first touching bar contains both levels
  • between_second_double_cross: trades where both levels were crossed between two consecutive seconds
  • ambiguity_rate: ambiguous / resolved (+95% CI, bootstrap over instruments)
  • heuristic_error_rate: share of ambiguous bars where the OHLC heuristic picks the wrong level (+CI)
  • optimistic_error_rate: share of ambiguous bars where 'target first' is wrong
  • target_first_share_truth: share of resolved trades that hit the target first (second-level truth)
  • ev_truth_bps: expectancy per trade at second level, bps of entry price, no costs
  • ev_bias_optimistic_bps / ev_bias_heuristic_bps: expectancy overstatement per trade of the bar assumption vs truth, bps (+CI)

Cite as: Matana Labs (2026). Stop loss or take profit first? How often bars can't tell. matanalabs.com/research/stop-loss-take-profit-intrabar-ambiguity/

Updated 2026-11-22. Research on historical data, not financial advice.

Questions

Is this a problem for swing traders?

Less so on intraday bars: wide brackets are rarely ambiguous there. It matters most for tight stops and for daily-bar backtests.

Does the OHLC heuristic solve it?

It is right more often than a coin flip, but far from reliably, and on any single trade it can be wrong.

What resolution is enough?

Ambiguity falls with bar size. For brackets of a quarter of a percent or tighter, even 1-minute bars leave a measurable share unresolved.

ShareXLinkedInRedditHacker NewsEmail