ATR (Average True Range)
ATR shows how far the market normally moves per candle; the key tool for setting stops and position size from volatility.
What it is
The average true range was also introduced by Welles Wilder. ATR has no direction and doesn't say whether the market goes up or down; it only measures how much it moves. High ATR means a volatile market, low ATR a calm one.
How it's calculated
- Each candle's true range = the largest of: high − low, |high − previous close|, |low − previous close|
- ATR = Wilder-smoothed average of the true range over 14 candles
How traders read it
- ATR stops: for example 1.5 to 3 ATR from entry, so the stop sits outside the market's normal noise.
- Position size: higher ATR means a wider stop and a smaller size, so the dollar risk stays the same.
- A sudden jump in ATR usually comes with news or important breakouts.
Settings
The default length is 14. ATR is in price units, so to compare markets, convert it to a percent of price.
Where it misleads
- ATR has no direction; don't use it to enter trades.
- ATR measures the past; around major news, real volatility can be far larger.
Its Pine Script on Vlevel
This is the script the chart runs. In the chart's indicators window you can open it, change it and save your own copy.
Average True Range · Pine Script v6
//@version=6
indicator("Average True Range", shorttitle = "ATR")
length = input.int(14, "Length", minval = 1)
smoothing = input.string("RMA", "Smoothing", options = ["RMA", "SMA", "EMA", "WMA"])
tr = ta.tr(true)
atr = switch smoothing
"RMA" => ta.rma(tr, length)
"SMA" => ta.sma(tr, length)
"EMA" => ta.ema(tr, length)
=> ta.wma(tr, length)
plot(atr, "ATR", color = #ff4d6a)Indicators describe past prices; none predicts the future. For education, not investment advice.