# Average True Range

Average True Range is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

Average True Range computes the true range of each bar, which is the largest of the high-low range and the gaps from the prior close, then smooths it over 14 periods and plots the result as a volatility line. A smoothing selector offers Wilder's RMA (the classic default) alongside SMA, EMA, and WMA. This build is the standard unaltered ATR calculation.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Apr 13, 2020.
- Access: free.
- Concepts: [ATR](https://www.luxalgo.com/library/concept/atr/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=gmvtwo4eg3el7ixdtmcxy2ik
- Page: https://www.luxalgo.com/library/indicator/average-true-range/

The **Average True Range** distills each bar's movement into a single volatility reading: the true range (the largest of the high-low span and the two distances from the prior close) averaged over a lookback. Measuring from the prior close captures gap moves a bare high-minus-low span would ignore, Wilder's reason for defining it this way. The build plots the classic 14-period ATR with a smoothing selector (Wilder's RMA default, plus SMA, EMA, and WMA), the standard, unaltered calculation.

## How to Trade the Average True Range?

- **Rising ATR**: ranges are expanding. Moves travel farther, stops need more room, and position sizes should shrink to keep risk constant.
- **Falling ATR**: contraction. Tighter stops become viable, and compressed readings are where breakout traders start paying attention.
- **Stops in ATR multiples**: an ATR-sized buffer past entry or structure adapts the exit to current conditions instead of a fixed tick count.
- **Sizing by ATR**: dividing the account risk per trade by an ATR-based stop distance normalizes exposure across instruments and regimes.
- **ATR spikes**: sudden jumps mark event-driven volatility, after which recent readings, not older ones, define what a normal distance means.

ATR is direction-blind and denominated in price units: a waterfall decline expands it just as a powerful advance does; a reading only means something against the instrument's recent history.

## Average True Range Settings

- **Length** (default 14): the number of bars averaged. Shorter lengths track regime shifts quickly but jump around; longer lengths give a stabler baseline for stops and sizing.
- **Smoothing** (default RMA): the moving average applied to the true range. RMA is Wilder's original smoothing and produces the classic ATR; SMA weighs all bars equally; EMA and WMA lean toward recent bars and react faster.

## Frequently Asked Questions

### Why use true range instead of the simple high-low range?

Gaps. When a bar opens far beyond the prior close, its high-low span understates what a position endured overnight; true range reaches back to the prior close, folding that jump into the estimate.

### Which smoothing option should I choose?

RMA is the faithful default, and most published ATR-based methods (stop multiples, channel widths, sizing rules) assume it, so keep it when following a standard recipe. EMA or WMA react faster after a volatility event; SMA gives the most literal average of the window.

### Can ATR generate buy or sell signals?

Not by itself. It contains no directional information. Its job is context and calibration: stop distances, position sizes, and the width for Keltner-style channels and chandelier-style trailing stops. It is the measuring stick other decisions are built on.

## Related indicators

- [ATR Exceedance Probability Model](https://www.luxalgo.com/library/indicator/atr-exceedance-probability-model/) (ATR): markdown at https://www.luxalgo.com/library/indicator/atr-exceedance-probability-model.md
- [Chandelier Exit Oscillator](https://www.luxalgo.com/library/indicator/chandelier-exit-oscillator/) (ATR): markdown at https://www.luxalgo.com/library/indicator/chandelier-exit-oscillator.md
- [Predictive Ranges](https://www.luxalgo.com/library/indicator/predictive-ranges/) (ATR Bands): markdown at https://www.luxalgo.com/library/indicator/predictive-ranges.md
- [ATR-based Stop Distance](https://www.luxalgo.com/library/indicator/atr-based-stop-distance/) (Volatility): markdown at https://www.luxalgo.com/library/indicator/atr-based-stop-distance.md
- [ATR Expansion/contraction](https://www.luxalgo.com/library/indicator/atr-expansion-contraction/) (Volatility): markdown at https://www.luxalgo.com/library/indicator/atr-expansion-contraction.md
- [Nadaraya-Watson Envelope](https://www.luxalgo.com/library/indicator/nadaraya-watson-envelope/) (Volatility): markdown at https://www.luxalgo.com/library/indicator/nadaraya-watson-envelope.md
- [Hot Zone Radar](https://www.luxalgo.com/library/indicator/hot-zone-radar/) (Volatility): markdown at https://www.luxalgo.com/library/indicator/hot-zone-radar.md
- [Volatility Contraction Pattern](https://www.luxalgo.com/library/indicator/volatility-contraction-pattern/) (Volatility): markdown at https://www.luxalgo.com/library/indicator/volatility-contraction-pattern.md

---

Source: https://www.luxalgo.com/library/indicator/average-true-range/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
