ATR
ATR (Average True Range) is J. Welles Wilder's volatility measure, introduced in his 1978 book New Concepts in Technical Trading Systems. ATR, also known as NATR / ATR %, is a Volatility concept. The Library holds 3 implementations, each one ready to run on Vela.
Top ATR indicators
The top custom implementations, built on the original standard ATR formula.
3 total
See the top ATR implementation below on Vela, our next-generation charting platform, then ask Quant to turn it into a strategy you can backtest.
The standard ATR indicator
ATR exactly as classically defined: the faithful reference build of the original formula, free to run in Quant.
What is ATR?
ATR (Average True Range) is J. Welles Wilder's volatility measure, introduced in his 1978 book New Concepts in Technical Trading Systems. It begins with each bar's true range: the largest of high minus low, the absolute distance from the high to the prior close, and the absolute distance from the low to the prior close. Anchoring to the previous close counts gaps that a plain high-minus-low range would miss. ATR is true range averaged over a lookback, 14 periods in Wilder's original, using his own RMA smoothing.
Two properties govern the read. ATR is direction-blind: it measures how much price moves, not which way, so it rises in panicked selloffs as readily as in strong rallies. And it is denominated in price units, so a reading only means something relative to the instrument itself; dividing by price gives NATR (ATR percent), which makes volatility comparable across markets and across an instrument's own history.
ATR matters because it is the working unit of volatility in trading system design. Stops set in ATR multiples breathe with conditions instead of using fixed ticks, position sizes scaled to ATR keep risk broadly comparable across instruments, and a large family of tools builds on it, including Keltner Channels, Supertrend, and the Chandelier Stop. None of that makes it predictive on its own: ATR describes recent movement, and volatility regimes can shift abruptly.
How to calculate ATR
Everything flows from the true range of a single bar; ATR is its smoothed average.
- 1For each bar, compute true range: the greatest of high minus low, the absolute value of high minus the previous close, and the absolute value of low minus the previous close.
- 2Average true range over the lookback. Wilder used 14 periods with his RMA smoothing: current ATR equals the prior ATR times 13, plus the newest true range, divided by 14.
- 3Read the result in price units: an ATR of 2.50 on a 100-dollar stock means a typical bar's effective travel is about 2.5 percent of price.
- 4Check the smoothing before comparing across platforms: an SMA or EMA of true range at the same length responds faster than Wilder's RMA and prints different values.
How it's calculated
A smoothed average of the bar-by-bar true range, measuring volatility in price units with gaps included.
Line 2 is Wilder's smoothing (RMA), equal to an EMA with alpha = 1/n; platforms offering SMA or EMA smoothing instead print different values.
On the first bar of history there is no prior close, so TR_1 = H_1 - L_1.
ATR is in price units and not comparable across symbols; NATR (ATR percent) rescales it for comparison.
How traders use it
- For stop placement: setting initial and trailing stops a multiple of ATR beyond entry or structure scales the buffer to current conditions; the conventions live under ATR-based Stop Distance and the ATR Trailing Regime.
- For position sizing: fixing the cash risk per trade while the stop distance floats with ATR, the core of Volatility-targeted Sizing, makes a position in a quiet instrument and one in a wild instrument carry comparable practical risk.
- As a breakout filter: requiring a close beyond a level by a fraction of ATR, or a bar whose range exceeds an ATR multiple, screens out breakouts too small to distinguish from noise.
- As a regime gauge: rising versus falling ATR separates expansion from contraction phases (ATR Expansion/contraction), which adaptive systems use to switch parameters, widen targets, or stand aside.
ATR vs other volatility measures
ATR Bands: ATR is a scalar volatility reading; ATR Bands project that scalar around price or a moving average to make a tradable envelope. The bands inherit ATR's smooth, gap-aware character.
Close-to-close Historical Volatility: Historical volatility is the standard deviation of close-to-close returns, usually annualized. It sees only closing prices, ignoring the highs and lows inside each bar that true range includes, and it is expressed in percent terms where ATR is in price units.
BandWidth: BandWidth measures the spread of Bollinger Bands relative to their middle band, a normalized, standard-deviation-based gauge. ATR answers the same how-volatile question from bar ranges rather than the dispersion of closes.
ADX / DMI System: ADX, also Wilder's and also non-directional as a line, measures trend strength from directional movement. ATR measures raw movement regardless of whether it trends; a choppy market can have high ATR and low ADX at once.
ATR FAQ
Turn ATR into a trading strategy.
Open the top implementation from this page in Vela. Quant, our coding agent, builds the strategy with you and backtests it on real data.
Browse this familyVolatility61 concepts mapped · 61 in the Library
- %B
- Acceleration Bands
- ATR
- ATR Bands
- ATR Expansion/contraction
- ATR-based Stop Distance
- Average Daily Range
- Band Walk
- BandWidth
- Bollinger Band Tag Reversion
- Bollinger Bands
- Bollinger Squeeze
- Chaikin Volatility
- Choppiness Index
- Close-to-close Historical Volatility
- Damiani Volatmeter
- Donchian Channels
- Donchian Width
- Double Bollinger Zones
- Envelope
- Event-driven Volatility
- EWMA Volatility
- Expected Move
- Fibonacci Bollinger Bands
- Gap-volatility Relation
- GARCH-family Clustering
- Garman-Klass Estimator
- Garman-Klass–Yang-Zhang Hybrid
- Jump Detection
- Kase Studies
- Keltner Channels
- Mass Index
- NR4/NR7 Narrow-range Bars
- Parkinson Estimator
- Projection Bands
- Range Expansion/contraction
- Realized Volatility
- Relative Volatility Index
- Rogers-Satchell Estimator
- Squeeze Release Direction
- Standard-deviation Channel Width
- STARC Bands
- SVE Bands
- The Range Indicator
- TTM Squeeze
- Ulcer Index
- Volatility Breakout
- Volatility Cones
- Volatility Contraction Pattern
- Volatility Estimators
- Volatility of Volatility
- Volatility Percentile/rank
- Volatility Ratio
- Volatility Regime Classification
- Volatility Signature Plot
- Volatility Switch
- Volatility Term Structure
- Waddah Attar Explosion
- Weekend/overnight Volatility Profile
- Williams VIX Fix
- Yang-Zhang Estimator


