The Average True Range (ATR) is a technical analysis indicator developed by J. Welles Wilder Jr. to measure market volatility. It is derived from the average of the true ranges over a specified period, typically 14 days.
The Formula for Calculating ATR
The ATR is calculated using the following steps:
-
Find the True Range (TR) for each period, which is the maximum of:
- \( \text{Current High} - \text{Current Low} \)
- \( |\text{Current High} - \text{Previous Close}| \)
- \( |\text{Current Low} - \text{Previous Close}| \)
Mathematically:
$$ TR_t = \max(H_t - L_t, |H_t - C_{t-1}|, |L_t - C_{t-1}|) $$ -
Compute the ATR as the moving average of the true range over the desired period \(N\):
$$ ATR_t = \frac{\sum_{i=0}^{N-1} TR_{t-i}}{N} $$