How it works
Average True Range is the workhorse of volatility measurement, and its value comes from one design decision: it measures the range a bar actually travelled rather than the range it appears to have travelled. A bar that gaps up three percent overnight and then trades in a narrow band has a tiny high-minus-low range but has clearly moved a long way. True range fixes that by including the previous close in the comparison, so overnight risk is counted rather than ignored.
The output is stated in the price units of the instrument, which is both its strength and the source of the most common mistake made with it. As a native-unit figure it slots directly into position sizing and stop placement: a stop set two ATR below entry is wide enough to survive normal noise and tight enough to cap the loss, and it rescales automatically as conditions change without anyone touching the setting. Divide the risk budget by that ATR-based stop distance and every trade in a portfolio carries a comparable risk contribution regardless of whether the instrument trades at nine dollars or nine hundred.
Traders also use it as a regime read and as a target scale. A market whose ATR has doubled is a different market, and rules calibrated on the old regime will be triggered constantly. Daily ATR gives a rough ceiling on what a single session can reasonably deliver, which is why intraday traders check how much of the average range has already been consumed before taking a new entry. And volatility filters built on ATR, such as requiring a break to exceed some fraction of ATR before it counts, remove a large share of the noise trades that plague simple breakout rules.
ATR is deliberately directionless. It cannot confirm a thesis, cannot tell a rally from a crash, and should never be plotted with the expectation that it will say anything about where price is heading. Against its neighbours it is smoother and more robust than a standard deviation of closes, because a single outlier lifts an average of ranges far less than it lifts a squared-deviation estimate, and it is the only common measure that accounts for gaps at all. Historical volatility, by contrast, is annualised and dimensionless and therefore better for cross-market comparison, while ATR is better for anything that has to be expressed in price.
Calculation
The arithmetic in words, in the order it happens.
For each bar compute the true range as the largest of three distances: the high minus the low, the absolute value of the high minus the previous close, and the absolute value of the low minus the previous close. Including the previous close is what makes the range true, because it captures overnight gaps that a plain high-minus-low range would miss. ATR is then a smoothed average of true range, conventionally over 14 periods using Wilder's method: seed with the simple average of the first 14 true ranges, then on each new bar set ATR equal to the previous ATR multiplied by 13, plus the current true range, all divided by 14. That is an exponential average with a smoothing factor of 1 over N, roughly half as responsive as a conventional EMA of the same length.
Source
An AlgoBeamScript implementation of the formula above, written by us from the arithmetic so the code and the calculation agree line for line.
Runs unchanged on the platform and in the AlgoBeamTS runtime. The language reference is in the documentation.
Inputs
Defaults are the values most charting packages ship with. They are conventions, not optimal settings — the right length depends on your instrument and your holding period.
| Input | Default | What it changes |
|---|---|---|
| Length | 14 | Bars in the smoothing. Wilder's original setting. Shorter values such as 5 track a regime change within days but make stop distances jumpy; 20 or more gives a stable figure suited to position sizing but slow to recognise that conditions have changed. |
| Smoothing method | Wilder's (RMA) | Which average is applied to true range. Wilder's smoothing is the definition; choosing a simple or exponential average of the same length produces a noticeably faster, noisier series, so any multiplier tuned on one is wrong for the other. |
How to read it
What practitioners take from the plot. Read these as descriptions of market state, not as entry signals.
- Rising steadily
- Bars are covering more ground. Widen stops and reduce size, otherwise the same nominal stop is now far more likely to be hit by noise.
- Falling to a multi-month low
- A compression regime. Breakout systems tighten their filters here, and the low reading is itself a setup because volatility mean reverts.
- Sharp single-bar spike
- A shock, a gap or a news event has entered the window. Because the smoothing is slow, that one bar will keep the reading elevated for weeks.
- ATR expanding while price goes sideways
- Range is widening without net progress, a disagreement regime that punishes both trend and reversion rules until it resolves.
Limitations
Where this indicator misleads. None of these are fixed by a better parameter.
- It is entirely backward looking. ATR expands after volatility has arrived, which means the stop that gets hit during a shock was sized for the calm that preceded it.
- One limit move or gap inflates the average for the whole smoothing window and then leaves it abruptly, so the same nominal risk setting silently changes meaning as that bar ages out.
- It carries no directional information whatsoever and cannot confirm any trade thesis on its own.
- Raw ATR values are not comparable between instruments unless divided by price. Comparing the ATR of a two-hundred-dollar stock with that of a ten-dollar one is a category error, and it is a common one.
Educational reference. This page explains how an indicator is built and how it is commonly read. It is not investment advice, not a recommendation and not a signal service. No indicator is profitable on its own — each is a way of describing a market, and any rule built on one has to be tested with realistic costs before it is traded.