ATR
Overview of the Average True Range calculation.
The Average True Range (ATR) is a technical indicator of volatility based on the average of a particular set of trading ranges over a defined number of periods. The ATR is the average of the true range for a set of periods. The greatest of one of three ranges is calculated as the true range for a period: the current high minus the current low, the current high minus the previous period’s close, or the current low minus the previous close.
Once the true range is calculated, the average for a set lookback period is taken, typically 14 periods. A decline in ATR indicates a decrease in recent volatility. An increase in ATR indicates an increase in recent volatility.
The source code for the ATR function is available here.
Last updated