Concept

Deviation Above/below Range

Deviation Above/below Range is a Market Structure concept. The Library holds 1 implementation, a working definition you can pull into Quant.

Top Deviation Above/below Range indicator

The top custom implementation, built on the original standard Deviation Above/below Range formula.

1 total

This Deviation Above/below Range implementation is strategy-ready: open it in Quant, set your rules, and it backtests automatically.

What is a Deviation Above/below Range?

A deviation is a move that leaves an established trading range, trades above its high or below its low, fails to find acceptance, and closes back inside. The term is common in crypto range-trading vocabulary, where a range's extremes are treated as a resting liquidity pool: the deviation is the excursion that collects those stops without building value outside. What separates a deviation from a breakout is the re-entry; the market comes back into the range and holds there, showing the outside prices were rejected rather than accepted.

The vocabulary rose with crypto range-trading content in the late 2010s and 2020s, but the event itself is old charting territory: Wyckoff called the bullish version a spring and the bearish one an upthrust, and classical literature filed both under failed breakouts. More recent candle-range-theory material recycles the same idea one level down, treating each higher-timeframe candle as a range whose high or low can be deviated and reclaimed. The names differ; the mechanic, a probe that fails to hold beyond a defined extreme, does not.

The standard reading is rotational: once an extreme has been deviated and reclaimed, the stops beyond it are spent, and price often rotates back through the range toward the opposite side. A deviation below the lows followed by a reclaim is a common long trigger, with the mirror at range highs. Acceptance versus rejection is a judgment made in real time and revised: an excursion that re-exits and holds outside was a breakout after all, which is why the deviation's extreme serves as the invalidation.

Judging acceptance is the craft. Time spent outside, the number and size of closes beyond the boundary, and whether trading outside builds any value all weigh against a fast, wick-heavy rejection, and the read sharpens across timeframes: a single daily deviation is a whole failed expedition on the hourly chart, which is why multi-timeframe alignment work treats the lower timeframe as the place to watch the reclaim happen. At swing scale rather than range scale, the same probe-and-fail event is the swing failure pattern.

How to identify a deviation on a chart

The bearish-to-bullish case at range lows is described; mirror it for deviations above range highs.

  1. 1Establish the range first: a mature trading range with a defined high and low that have each been tested more than once.
  2. 2Watch the excursion: price breaks below the range low, often quickly, into the stops resting beneath it.
  3. 3Grade acceptance in real time: closes stacking below the boundary and value building outside argue breakout; hesitation, long lower wicks, and failure to extend argue rejection.
  4. 4Require the reclaim: one or more decisive closes back inside the range on the timeframe that defined it convert the break into a deviation.
  5. 5Mark the deviation's extreme as invalidation; trading back below it says the rejection read was wrong.
  6. 6Frame the rotation: the range midpoint and opposite extreme become the working targets, per the standard rotational logic of ranges.

How it's calculated

Defines a failed breakout in which price trades beyond a range boundary but closes back inside the range.

RH=max(Hi) over bars i in the range window\operatorname{RH} = \max(H_i) \text{ over bars } i \text{ in the range window}
RL=min(Li) over bars i in the range window\operatorname{RL} = \min(L_i) \text{ over bars } i \text{ in the range window}
Deviation above: Ht>RH and Ct<RH\text{Deviation above: } H_t > \operatorname{RH} \text{ and } C_t < \operatorname{RH}
Deviation below: Lt<RL and Ct>RL\text{Deviation below: } L_t < \operatorname{RL} \text{ and } C_t > \operatorname{RL}
RH: range high, the highest high of the established range
RL: range low, the lowest low of the established range
H: bar high
L: bar low
C: bar close
i: bar index inside the range window
t: bar index of the breakout attempt

The range is an established consolidation, defined by detected pivot highs and lows or by user-set levels, usually with a minimum number of bars inside it.

Many implementations allow the close back inside to occur within a few bars of the poke rather than on the same bar.

Also called a false breakout or swing failure; the deviation is only confirmed once price closes back inside the range.

How traders use it

  • As a reversal trigger at range extremes: after price deviates and closes back inside, traders position toward the range midpoint and opposite extreme, with stops beyond the deviation's furthest point.
  • As a patience rule for range trading: instead of fading the first touch of a boundary, some models require the full deviation-and-reclaim sequence, accepting a later entry in exchange for evidence the extreme was rejected.
  • As a breakout filter: breakout traders treat a decisive close back inside the range as failure and exit quickly, rather than holding through what has become a deviation.
  • As a phase tell in range classification: a deviation below the lows that gets bought back aggressively is one of the behaviors that tilts an ambiguous range toward the accumulation side of the accumulation versus distribution question.
  • As a swing-scale trigger: the same probe-and-reclaim logic applied to a single prior swing high or low rather than a whole range is traded as the swing failure pattern, with identical invalidation logic.

Deviations vs similar concepts

False Breakout: Essentially the same event in older vocabulary: a boundary break that fails and returns. 'False breakout' names the trap after the fact; deviation language centers the reclaim itself and the rotation trade toward the other side of the range.

Liquidity Sweep: A sweep is the raid on resting stops at any level, and can be a wick-only event at a single swing point. A deviation is specifically about an established range's extremes and is defined by the failure to hold outside the range.

Spring: Wyckoff's name for the bullish case: a shakeout below range support that recovers, read as evidence of accumulation (the bearish mirror is the upthrust). A deviation below the lows is the same price event without the Wyckoff phase context attached.

Concept family

Market Structure

31 concepts mapped · 31 in the Library

Deviation Above/below Range FAQ

Turn Deviation Above/below Range into a trading strategy.

Take the implementation from this page into Quant, then build on it, backtest it on real data, and keep refining it in conversation.