The Average True Range (ATR) is a technical analysis indicator that measures market volatility by decomposing the entire range of an asset price for that period. Unlike other indicators that measure trend direction, ATR measures the *degree* of price movement. High ATR values indicate high volatility (large price swings), while low ATR values indicate low volatility (consolidation).
## Historical Context
Introduced by J. Welles Wilder Jr. in his 1978 book *"New Concepts in Technical Trading Systems"*, ATR was originally designed for commodities markets, which are often more volatile than stocks. Wilder realized that looking at the simple High-Low range was insufficient because it ignored gaps between the previous close and the current open. He introduced the concept of "True Range" to capture the full extent of market activity.
## How It Works
### The Core Idea
ATR answers the question: "How much does this asset typically move in a single bar?"
It does this by first calculating the "True Range" (TR) for each bar, which accounts for gaps, and then smoothing these TR values using a Running Moving Average (RMA).
### Mathematical Foundation
1.**True Range (TR):**
The True Range is the greatest of the following three values:
| Period | 14 | Lookback window | Standard is 14. Shorter (e.g., 7) = more sensitive to recent volatility spikes. Longer (e.g., 21) = smoother measure of volatility. |
| Bar correction | O(1) | Efficient state rollback |
| Batch processing | O(N) | Single pass through data |
| Memory footprint | O(1) | Minimal state (previous bar + RMA state) |
## Interpretation
### Trading Signals
#### Volatility Measurement
- **High ATR:** Indicates a volatile market. Stops should be wider to avoid noise.
- **Low ATR:** Indicates a quiet market. A breakout from a low-ATR consolidation is often explosive.
#### Stop Loss Placement
- **Chandelier Exit:** Many traders place trailing stops at $Close - (Multiplier \times ATR)$.
- **Position Sizing:** ATR is crucial for volatility-based position sizing (e.g., the "Turtle Trading" system). If ATR is high, trade smaller size; if ATR is low, trade larger size.
### When It Works Best
- **Risk Management:** ATR is arguably the most important indicator for risk management, helping traders normalize risk across different assets.
### When It Struggles
- **Direction:** ATR tells you nothing about direction. A crashing market and a rocketing market can both have high ATR.
- **Rationale:** Strict adherence to Wilder's original definition. Some platforms offer SMA-smoothed ATR, but that is technically a different indicator.
## References
- Wilder, J. Welles Jr. "New Concepts in Technical Trading Systems." Trend Research, 1978.