Indicator Formula

Technical Details — Average True Range (ATR)
Section titled “Technical Details — Average True Range (ATR)”Overview
Section titled “Overview”ATR smooths the True Range to measure average volatility.
Key Concepts:
- True Range: The largest of three range measurements (accounts for gaps)
- RMA Smoothing: Smooths TR to reduce noise
- Normalization: Expressed as % of price for comparability
Mathematical Derivation
Step 1 — Calculate True Range
Section titled “Step 1 — Calculate True Range”Purpose: Measure the full range including any gaps.
$$TR[t] = \max(High[t] - Low[t], |High[t] - Close[t-1]|, |Low[t] - Close[t-1]|)$$
Where:
- The three components capture intrabar range and any gap from previous close
What This Measures: The maximum possible price movement in a single bar
Step 2 — Smooth with RMA
Section titled “Step 2 — Smooth with RMA”Purpose: Average the true range over n periods.
$$ATR[t] = \frac{ATR[t-1] \times (n-1) + TR[t]}{n}$$
Where:
- $$n$$ = Smoothing period
What This Measures: Smoothed average volatility
Step 3 — Normalize to Percentage
Section titled “Step 3 — Normalize to Percentage”Purpose: Express as % of price.
$$ATR%[t] = \frac{ATR[t]}{Close[t]} \times 100$$
What This Measures: Volatility as a percentage of price
Compact Formula Summary
$$TR = \max(H-L, |H-C_{prev}|, |L-C_{prev}|)$$ $$ATR = RMA(TR, n)$$ $$ATR% = ATR / Close \times 100$$
Default: Period = 14
Complete Calculation Example
High=46, Low=44.50, PrevClose=44.00: TR = max(1.50, |46-44|, |44.50-44|) = max(1.50, 2.00, 0.50) = 2.00
The gap from previous close (44→46) created a larger true range than the intrabar range.
Key Takeaways from the Example
- True Range ≥ High-Low: TR always captures the full move including gaps
- RMA Smoothing: ATR changes gradually, reflecting sustained volatility changes
- Relative Measure: ATR% allows comparing volatility across different-priced assets