# ATR Expansion/contraction

Also known as: range-vs-ATR ratio.
A Volatility concept (ATR family) in the LuxAlgo Library, with 1 indicator implementation.

## What is ATR Expansion/Contraction?

ATR expansion/contraction reads the direction of change in [ATR](https://www.luxalgo.com/library/concept/atr/), Wilder's smoothed measure of true range. Rising ATR means each bar is covering more ground (expansion); falling ATR means ranges are compressing (contraction). Common constructions include comparing ATR to its own moving average, dividing a short-lookback ATR by a long-lookback one, or taking the current bar's true range as a ratio of prevailing ATR to flag individual expansion bars.

The read matters because volatility runs in cycles: contractions tend to resolve into expansions, and expansions eventually decay, while ATR itself says nothing about direction. Because ATR is heavily smoothed it turns slowly, so the per-bar range-versus-ATR ratio is the fast, noisy version of the read and the ATR slope is the slow, stable one.

The concept is the range-based wing of the squeeze family. Where the [Bollinger squeeze](https://www.luxalgo.com/library/concept/bollinger-squeeze/) and [TTM squeeze](https://www.luxalgo.com/library/concept/ttm-squeeze/) infer compression from band geometry, ATR expansion/contraction measures it directly from bar travel, gaps included, which keeps the read meaningful on gappy daily charts and instruments where close-based deviation understates movement. The two wings usually agree; when they diverge, the difference is almost always gap or intrabar behavior that only true range sees.

Reading it well is mostly a matter of context. An ATR level means little in isolation, so practitioners frame the current reading against its own history with a [volatility percentile](https://www.luxalgo.com/library/concept/volatility-percentile-rank/), watch how long each state has persisted (fresh expansion behaves differently from a mature one), and remember the asymmetry of the cycle: contractions build slowly and resolve abruptly, while expansions decay in stages as the market digests its move.

## How to read ATR expansion/contraction

The state is read from ATR's own behavior, not from any fixed level.

1. Plot ATR alongside a reference: its own moving average, or a short-ATR-to-long-ATR ratio pane, so rising and falling states are explicit.
2. Classify the state: ATR above its average and rising is expansion; below and falling is contraction; the crossings mark the transitions.
3. Flag expansion bars separately: a single bar whose true range is a large multiple of prevailing ATR is an event within whatever state the market is in.
4. Add percentile context: the same ATR value can be a high or low reading depending on the instrument's recent history, so rank it before judging it.
5. Cross-check the band view: agreement with [BandWidth](https://www.luxalgo.com/library/concept/bandwidth/) or a squeeze indicator confirms the read; disagreement usually traces to gaps that only true range captured.
6. Take direction from elsewhere: the state says how much the market is moving, never which way.

## How it's calculated

Compares the current bar's true range to its recent average to flag widening (expansion) or narrowing (contraction) volatility.

```
TR_t = max(H_t - L_t, abs(H_t - C_(t-1)), abs(L_t - C_(t-1)))
ATR_t = (ATR_(t-1) × (n - 1) + TR_t) / n
Ratio_t = TR_t / ATR_t
Expansion: Ratio_t > 1 (bar range wider than its recent average)
Contraction: Ratio_t < 1 (bar range narrower than its recent average)

  TR_t: true range of bar t
  H_t: high of bar t
  L_t: low of bar t
  C_(t-1): close of the prior bar
  ATR_t: Average True Range at bar t (Wilder smoothing)
  ATR_(t-1): prior bar's ATR value
  n: ATR length (commonly 14)
  Ratio_t: range-vs-ATR ratio at bar t
  t: bar index
```

Other variants divide a fast ATR by a slow ATR (e.g. ATR_5 / ATR_20) or simply read rising ATR as expansion and falling ATR as contraction.

Thresholds such as Ratio_t > 1.5 or > 2 are often used to flag outsized breakout bars.

Some versions use the plain high-low range in the numerator instead of true range.

## How traders use it

- As breakout preparation: a sustained contraction, often alongside patterns like [NR4/NR7 narrow-range bars](https://www.luxalgo.com/library/concept/nr4-nr7-narrow-range-bars/), marks compressed conditions under which breakout entries are armed.
- As risk calibration: [ATR-based stop distances](https://www.luxalgo.com/library/concept/atr-based-stop-distance/) and targets naturally widen during expansion and tighten during contraction, keeping risk proportional to current conditions.
- As a conviction flag: a bar whose true range is a large multiple of prevailing ATR is the wide-range-bar signature, and many systems treat such bars as evidence of genuine participation behind a move.
- As a strategy switch: systems gate breakout tactics to contraction-into-expansion transitions and mean-reversion tactics to mature, decaying expansions, the ATR-side version of the general [range expansion/contraction](https://www.luxalgo.com/library/concept/range-expansion-contraction/) regime logic.
- As a sizing modulator: exposure scaled inversely to ATR keeps risk per trade steady across regimes, the bar-range cousin of sizing from [realized volatility](https://www.luxalgo.com/library/concept/realized-volatility/).

## ATR expansion/contraction vs neighboring volatility reads

- **Range Expansion/contraction** (https://www.luxalgo.com/library/concept/range-expansion-contraction/): The general concept covers any measure of ranges growing or shrinking; the ATR version pins it to Wilder's smoothed true range, gaining gap-awareness and a standard vocabulary of constructions (slope, ratio, expansion bars).
- **BandWidth** (https://www.luxalgo.com/library/concept/bandwidth/): BandWidth measures Bollinger envelope spread, a close-based standard-deviation read that flares and pinches quickly. ATR-based reads move more gradually and fold gaps in through true range; the pair disagreeing usually means a gap did the moving.
- **TTM Squeeze** (https://www.luxalgo.com/library/concept/ttm-squeeze/): The squeeze is a two-band state machine (Bollinger inside Keltner) that fires discrete on/off signals. ATR expansion/contraction is the continuous dial underneath such machines, readable at every bar rather than only at state changes.

## FAQ

### Does ATR expansion tell you which way price is going?

No. ATR is direction-blind: it measures how much ground bars cover, not which way. Expansion can accompany rallies, selloffs, or violent two-way chop. Traders pair the volatility read with a separate directional tool, using expansion mainly to size stops, qualify breakouts, or avoid mean-reversion entries into fast conditions.

### What counts as an ATR expansion bar?

There is no universal threshold. Implementations typically flag a bar when its true range exceeds some multiple of the prevailing ATR, with the multiple left as a tunable parameter: the higher it is set, the rarer and more significant the flagged bars. Percentile-based versions rank the current true range against its own history instead of using a fixed multiple.

### What settings do ATR ratio constructions use?

Conventions rather than standards: a short ATR of 5 to 10 bars against a long one of 20 to 50 is common for the ratio form, and ATR against its own 20-period average is the usual slope form. Shorter references react faster and whipsaw more. As with the base indicator, the choice tunes responsiveness, and calibrating against the instrument's own history matters more than the specific pair.

### Does contraction reliably lead to expansion?

Eventually, yes, volatility is cyclical; on schedule, no. Compressions can extend far longer than positioning survives, and the first expansion out of a squeeze is sometimes a false start that fails back into the range. That is why compression is treated as arming condition rather than entry: the trade takes the expansion itself, with the failed-break case planned for.

### How does ATR expansion differ from Bollinger Band expansion?

Input and temperament. Bollinger width is built from the standard deviation of closes, so it reacts quadratically to close-to-close shocks and ignores gaps and intrabar extremes. ATR is built from true range, so gaps and wicks count, and Wilder smoothing makes its turns gradual. On gapless, liquid intraday charts they track closely; on daily charts with gaps they part company.

### Do session effects distort intraday ATR reads?

Systematically: intraday ranges follow the session curve, wide at the open, narrow at midday, wider again at the close, so a raw ATR falls into lunch and rises into the bell on schedule alone. Intraday expansion reads either compare like time slots, use session-relative baselines, or accept that part of every reading is just the clock.

## Implementations in the Library

- ATR Expansion/contraction (LuxAlgo): https://www.luxalgo.com/library/indicator/atr-expansion-contraction/

## Related concepts

- ATR: https://www.luxalgo.com/library/concept/atr/
- ATR Bands: https://www.luxalgo.com/library/concept/atr-bands/
- ATR-based Stop Distance: https://www.luxalgo.com/library/concept/atr-based-stop-distance/

---

Source: https://www.luxalgo.com/library/concept/atr-expansion-contraction/ (LuxAlgo Library, the encyclopedia of trading & technical analysis). Free to use with attribution: https://www.luxalgo.com/library/license/