Skip to content
The Casebook · A classic strategy

Buy after a wide-range day closing near its high

Buy after a day whose range is more than twice the 20-day ATR and that closes in the top 20% of its range.
VerdictTested Nov 22, 2026

Survivorship mirage

It clears the bar on today's winners, the stocks everyone wishes they had bought, but not on the laggards, which is where hindsight can't help.

  • It clears the bar on today's winners but not on the laggards: the winners' own rise did the work.
Trades on the laggards
607

42 large US stocks, 15 years

Per trade, after costs
−0.155R

Before costs −0.066R

Bar to clear
t > 2.01

By trade and by day, sized to a first try

What the numbers say

On the 22 laggards the idea averaged −0.155R per trade after costs over 607 trades, against 0.079R on today's winners. It was below random dates in bull, flat and bear markets (share of random draws beaten 0.0 each). The winners' result does not carry to the laggards, hence the verdict.

How it was tested

Go long at the close of a day whose high-low range exceeds twice the 20-day ATR and whose close is in the top 20% of that range.

Side
Long
Time limit
Exit at the close after 10 trading days, unless the stop, the target or its own exit comes first
Bar to clear
t > 2.01, by trade and by day, sized to a first try (one idea, tested once)
Prices
15 years of daily bars through 2026-11-20; judged 2026-11-22
Choices made where the idea was open
  • ATR is Wilder's ATR with a 20-day period, using true range including gaps
  • The signal-day range is compared to the ATR computed through the prior day (t-1) so the big bar does not inflate its own benchmark
  • 'Top 20% of its range' means (close - low) / (high - low) >= 0.80
  • Days with zero range are skipped
  • No stop or target was given, so stop is 2 x ATR(20) below entry and target is 4 x ATR(20) above entry
  • No holding period was given, so max hold is 10 trading days

The evidence

The laggards decide: 22 large stocks that lagged or fell, where hindsight can't flatter a rule. Today's winners sit beside them to show what survivorship would add.

MarketTradesPer tradet, by tradet, by dayRandom datesWinners, per trade
Bull423−0.141R−2.68−1.15 · 296d−0.036R · beats 0%+0.245R
Flat114−0.201R−2.11−1.50 · 68d−0.029R · beats 0%−0.303R
Bear70−0.167R−1.29−0.32 · 29d−0.013R · beats 0%−0.311R
All607−0.155R−0.032R+0.079R

R is the result per trade in units of the risk taken (entry to stop). Costs are each stock's own trading spread (median 14.1 bps) plus 0.045R for the fills a real order wouldn't get. “By day” groups trades opened the same day, so a rule that fires on the same dates for every stock counts as a few events. “Random dates” places the same plan on random days of the same stocks in the same kind of market, 20 times; the idea must beat 95% of those draws.

The scanner we wroteShow the code
from decimal import Decimal

from core.domain import Bar
from scanners.base import Candidate


class WideRangeBarClosingNearHighLong:
    name = "wide_range_bar_closing_near_high_long"
    description = "Long at close of a day with range > 2x prior-day ATR(20) and close in top 20% of range."

    def __init__(self, period: int = 20, range_mult: float = 2.0, close_pos_min: float = 0.80,
                 stop_mult: float = 2.0, target_mult: float = 4.0) -> None:
        self._period = period
        self._range_mult = range_mult
        self._close_pos_min = close_pos_min
        self._stop_mult = stop_mult
        self._target_mult = target_mult

    def _wilder_atr_series(self, bars):
        # returns list aligned to bars; None where not available
        n = len(bars)
        p = self._period
        out = [None] * n
        trs = [None] * n
        for i in range(1, n):
            h = float(bars[i].high)
            l = float(bars[i].low)
            pc = float(bars[i - 1].close)
            trs[i] = max(h - l, abs(h - pc), abs(l - pc))
        if n < p + 1:
            return out
        first = sum(trs[1:p + 1]) / p
        out[p] = first
        prev = first
        for i in range(p + 1, n):
            prev = (prev * (p - 1) + trs[i]) / p
            out[i] = prev
        return out

    def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
        p = self._period
        if len(bars) < p + 2:
            return None
        cur = bars[-1]
        rng = float(cur.high) - float(cur.low)
        if rng <= 0:
            return None
        series = self._wilder_atr_series(bars)
        atr_prev = series[-2]
        atr_now = series[-1]
        if atr_prev is None or atr_now is None or atr_prev <= 0 or atr_now <= 0:
            return None
        if not (rng > self._range_mult * atr_prev):
            return None
        pos = (float(cur.close) - float(cur.low)) / rng
        if pos < self._close_pos_min:
            return None
        entry = cur.close
        atr_dec = Decimal(str(atr_now))
        stop = entry - Decimal(str(self._stop_mult)) * atr_dec
        target = entry + Decimal(str(self._target_mult)) * atr_dec
        if stop <= 0 or not (stop < entry < target):
            return None
        rr = (target - entry) / (entry - stop)
        return Candidate(
            ticker=ticker,
            side="buy",
            entry=entry,
            stop=stop,
            target=target,
            risk_reward_ratio=rr.quantize(Decimal("0.01")),
            signal_strength=50,
            thesis="Range exceeded 2x prior ATR(20) and close in top 20% of the bar's range.",
        )

Hypothetical results from our own backtest of the rule as restated, on 42 large US stocks over 15 years. Past performance, real or simulated, does not predict future results. Research and education only; not investment advice.

Have an idea of your own?

Describe it in plain words and get the same honest test in about a minute.

Run the Gauntlet
Buy after a wide-range day closing near its high: Survivorship mirage · EdgeProven