◆ New — Strategy Validator, Code Fixer & Prop Compliance Checker are live. Try one free →
Home / Indicators / Average True Range (ATR)
Volatility indicator

Average True Range (ATR)

A volatility gauge that measures how much price moves on average over a chosen period, expressed in price units.

Illustrative diagram — not live market data.

What it is

ATR (Average True Range) is a volatility indicator developed by J. Welles Wilder Jr. and introduced in his 1978 book "New Concepts in Technical Trading Systems." It measures the average size of price movement over a set number of bars, expressed in the instrument's price units (e.g. pips, dollars, points). ATR does not tell you the direction of a trend — only how much the market is moving. A rising ATR reflects larger bar ranges (more volatility); a falling ATR reflects smaller bar ranges (calmer conditions). It is most often plotted as a single line in a separate pane below the price chart.

How it works

ATR is built on the concept of "True Range," which captures the full size of a bar's move including any gap from the previous close. True Range for each bar is the largest of three values: (1) the current high minus the current low, (2) the absolute difference between the current high and the previous close, and (3) the absolute difference between the current low and the previous close. Using the previous close in two of these lets True Range account for overnight or session gaps that a simple high-minus-low would miss. ATR is then a moving average of True Range over a chosen lookback (Wilder's default is 14 periods). Wilder used his own smoothing method — often called Wilder's smoothing or RMA — which behaves like an exponential moving average with a smoothing factor of 1/length, so older values fade gradually rather than dropping out abruptly. Because it averages absolute ranges, ATR is always non-negative and reads in the same units as price, so its typical value depends entirely on the instrument and timeframe.

How traders read it

Common settings

Length 14 is Wilder's original default. Shorter lengths (e.g. 7 or 10) react faster and look noisier; longer lengths (e.g. 20–50) are smoother and slower. ATR is usually plotted in its own pane. Volatility-based stop or sizing approaches that reference ATR often use a multiplier such as 1.5x, 2x, or 3x, chosen by the trader; these are illustrative settings, not recommendations.

Strengths

Pitfalls to watch

Pine v6 example

//@version=6
indicator("Average True Range", overlay = false)

length = input.int(14, "ATR Length", minval = 1)

// ta.atr applies Wilder's smoothing (RMA) to True Range
atrValue = ta.atr(length)

plot(atrValue, "ATR", color = color.orange, linewidth = 2)

Pro tip: To compare volatility across different instruments or price levels, divide ATR by the current price to get a percentage (ATR%). This normalises the reading so a quiet $300 stock and a quiet $20 stock can be assessed on the same scale.

Built an indicator from this? Run it through the Validator to catch look-ahead bias and repainting, or convert a strategy to Pine Script.

Educational only — not financial advice, not a recommendation to trade. No indicator is predictive; trading involves substantial risk of loss.

Catch the bug that compiles.Run auditGet Pro