Concept

Range Expansion/contraction

Range Expansion/contraction, also known as expansion-day statistics, coiling, is a Volatility concept. The Library holds 2 implementations, each one a working definition you can pull into Quant.

Top Range Expansion/contraction indicators

The top custom implementations, built on the original standard Range Expansion/contraction formula.

2 total

Any of the 2 Range Expansion/contraction implementations below can become a backtested trading strategy — describe your rules and Quant writes the code.

What is Range Expansion/contraction?

Range expansion and contraction describe the two phases volatility cycles through at the bar level. In contraction, true ranges shrink, candles overlap, and price coils into ever-tighter congestion; in expansion, bars widen, overlap disappears, and wide-range bars travel directionally. The alternation reflects one of the oldest documented regularities in market data: quiet sessions tend to follow quiet sessions and turbulent sessions tend to follow turbulent ones until the regime breaks, and the tightest coils tend to sit just before the widest bars.

Toby Crabel gave the idea its short-term trading vocabulary. His 1990 book on short-term price patterns and the opening range breakout defined narrow-range days such as NR4 and NR7, measured what tended to follow unusually narrow and unusually wide sessions, and used compression as a filter for breakout entries off the next session's open. The same regularity underpins the persistence seen in realized volatility, and chart tools have operationalized it in many ways, from Bollinger Band width statistics to the TTM Squeeze's test of whether the bands have slipped inside Keltner Channels.

The concept is a regime read rather than a single formula. Traders proxy it with rising or falling ATR, BandWidth percentiles, counts of narrow-range bars, or the ratio of the current bar's range to a recent average. Which phase the market is in decides the playbook: contraction favors preparing for breakouts with tight risk, while expansion favors riding momentum with wider stops.

What contraction does not supply is direction or timing. A coil can keep coiling, and the first break out of one is often the false one, which is why experienced traders pair the volatility read with structure: where the coil sits inside the larger trend, which boundary gives way (the congestion's edges, or Donchian extremes), and whether the expansion bar closes strong or leaves a long tail. Framing the current reading as a percentile of its own history keeps the judgment comparable across instruments, since raw range numbers are not.

How to identify expansion and contraction on a chart

No indicator is strictly required to see the cycle, though a width measure makes the read objective.

  1. 1Compare each bar's high-to-low range with the average of the previous 10 to 20 bars: a run of bars printing well below that average marks contraction, and a bar printing at a large multiple of it marks expansion.
  2. 2Watch overlap: contracting bars trade mostly inside their neighbors, producing inside bars and NR4/NR7 sessions, while expansion bars open near one extreme and close near the other with little overlap between candles.
  3. 3Add one width statistic, such as ATR or BandWidth, and read its slope and level together: falling and near the bottom of its one-year range signals a coil, while turning up sharply from a low base signals expansion getting under way.
  4. 4Mark the coil's boundaries (the congestion's swing high and low) so the eventual break has a defined trigger and an equally defined failure point.
  5. 5Demand follow-through before trusting expansion: one wide bar can be an outlier, whereas a genuine regime change usually strings several above-average ranges together with directional closes.

How it's calculated

Classifies each bar's range as unusually wide or narrow relative to recent bars to flag volatility expansion and coiling.

1. Compute each bar's range: Range_t = H_t - L_t, or true range TR_t = max(H_t, C_(t-1)) - min(L_t, C_(t-1)) to include gaps
2. Build a baseline: B_t = SMA_n(Range) or B_t = ATR_n, with n commonly 7 to 20
3. Form the ratio ER_t = Range_t / B_t
4. Flag an expansion bar when ER_t >= k_e, or when Range_t is the widest of the last m bars (a wide-range bar, e.g. WR7 with m = 7)
5. Flag a contraction bar when ER_t <= k_c, or when Range_t is the narrowest of the last m bars (narrow-range bars; NR4 and NR7 use m = 4 and 7)
6. Measure coiling by counting consecutive contraction or inside bars (H_t < H_(t-1) and L_t > L_(t-1)); longer streaks mean tighter compression
7. Build expansion-day statistics by tabulating what follows each flagged bar: next-bar direction, close location and subsequent range, to judge follow-through versus fade
H_t: high of bar t
L_t: low of bar t
C_t: close of bar t (C_(t-1) is the prior close)
t: bar index (t-1 is the prior bar)
Range_t: bar range, high minus low
TR_t: true range, the range extended across the prior close to capture gaps
B_t: baseline typical range at bar t
SMA_n: simple moving average over n bars
ATR_n: average true range over n bars
n: baseline lookback (commonly 7 to 20; 14 is typical for ATR)
ER_t: ratio of the bar's range to the baseline
k_e: expansion threshold (commonly 1.5 to 2.0)
k_c: contraction threshold (commonly 0.5 to 0.7)
m: lookback for widest/narrowest tests (7 in NR7 and WR7, 4 in NR4)

There is no single canonical formula; the NR4, NR7 and expansion-day statistics framing comes from Toby Crabel's short-term price pattern research.

The working premise is alternation: unusually narrow ranges often precede range expansion, which is why coiling streaks are watched for breakouts.

Use true range instead of high minus low on gap-prone markets, and expect thresholds and lookbacks to vary by platform.

How traders use it

  • Breakout preparation: runs of narrow bars (NR4/NR7 sessions) or multi-week lows in a width statistic become a watchlist condition, with entries staged on the break of the coil's boundaries.
  • Playbook switching: expansion regimes reward trend-following and momentum entries, while contraction rewards fading the edges of the range; formal regime classifiers simply turn that switch into a rule.
  • Risk scaling: stops and targets sized off recent range stay proportionate as conditions change; a stop tuned during contraction becomes noise-bait the moment expansion starts.
  • Exhaustion spotting: a climactic burst of expansion late in an extended trend, especially on heavy volume, is read by some traders as terminal acceleration rather than fresh strength, a hypothesis to confirm rather than assume.
  • Squeeze scanning: screeners rank a universe by width percentile or flag band-inside-channel conditions, producing each day's list of coiled candidates so the trader watches compression instead of hunting for it.

Range Expansion/contraction vs. related reads

Bollinger Squeeze: The Squeeze is one specific operationalization of contraction: BandWidth at a long-lookback low. Range expansion/contraction is the general phenomenon, measurable with any width or range statistic, on any bar type.

ATR Expansion/contraction: The same regime read expressed through one statistic: the level and slope of average true range. Range expansion/contraction is the broader lens; the ATR version is a smooth, convenient proxy that reacts slightly later than raw bar ranges.

Volatility Contraction Pattern: The VCP is a specific base-building pattern of successively shallower pullbacks within a stock's consolidation. Range contraction is the raw ingredient; the VCP adds structure, location, and a defined breakout trigger.

Concept family

Volatility

57 concepts mapped · 57 in the Library

Range Expansion/contraction FAQ

Turn Range Expansion/contraction into a trading strategy.

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