The Average True Range — Wilder's volatility measure (1978). Purely measures volatility, NOT direction.
ATR = Smoothed average of TR over N periods (default 14)
• Position sizing: Risk 1–2 ATR per trade → adapts to current volatility
• Stop loss: Place stops 1.5–2× ATR from entry
• Volatility filter: High ATR = trending market; low ATR = ranging
True range looks at yesterday’s close as well as today’s high and low, so gaps count. Day 13: high 102, low 98, previous close 102, so TR = max(4, 0, 4) = 4. Five-day ATR with Wilder’s smoothing is 3.41 on day 15: the typical bar is about 3.4 points, 3.3% of the price.
The example data: 15 days, used in every indicator here
| Day | High | Low | Close | Volume |
|---|---|---|---|---|
| 1 | 101 | 99 | 100 | 50,000 |
| 2 | 103 | 100 | 102 | 62,000 |
| 3 | 103 | 100 | 101 | 48,000 |
| 4 | 105 | 101 | 104 | 70,000 |
| 5 | 108 | 104 | 107 | 85,000 |
| 6 | 108 | 105 | 106 | 60,000 |
| 7 | 110 | 106 | 109 | 90,000 |
| 8 | 110 | 107 | 108 | 72,000 |
| 9 | 108 | 104 | 105 | 80,000 |
| 10 | 105 | 102 | 103 | 66,000 |
| 11 | 105 | 102 | 104 | 55,000 |
| 12 | 104 | 101 | 102 | 75,000 |
| 13 | 102 | 98 | 99 | 95,000 |
| 14 | 102 | 99 | 101 | 64,000 |
| 15 | 105 | 101 | 104 | 71,000 |
- It measures size, not direction; a high ATR comes with rallies and crashes alike.
- It is in price units. Compare it as a percentage of price across assets or long periods.
- Wilder’s smoothing is slow: after a shock ATR takes several bars to reflect the new volatility, and as long to forget it.
pc = df['close'].shift() tr = pd.concat([df['high'] - df['low'], (df['high'] - pc).abs(), (df['low'] - pc).abs()], axis=1).max(axis=1) df['atr5'] = tr.ewm(alpha=1/5, adjust=False).mean() # Wilder smoothing
Assumes import numpy as np, import pandas as pd, and a DataFrame df with columns high, low, close and volume — the 15 days above.
- New Concepts in Technical Trading Systems, J. W. Wilder, Trend Research, 1978
- C. Faith, Way of the Turtle, McGraw-Hill, 2007 — ATR (“N”) for stops and position size
Last reviewed October 2026 · How this site checks its content · Report a mistake
1. What does the Average True Range measure?
Show answer
B. Wilder designed it for commodities, where limit moves and gaps made the simple high–low range misleading.
2. How does the true range differ from the high minus the low?
Show answer
C. True range is the largest of: high − low, |high − previous close|, |low − previous close|.
3. Why set a stop at, say, 2 × ATR from entry?
Show answer
B. A fixed stop is too tight in volatile markets and too loose in calm ones. No stop guarantees the fill price.
- Pattern EssaysThe Coiled SpringQuiet gathers before loud. A narrowing range warns about size, not direction
- Risk & PortfolioFixed Fractional SizingRisk a constant percentage of equity on each trade
- Risk & PortfolioPyramidingAdd to winning positions in decreasing tiers
- Risk & PortfolioRisk ParityWeight assets so each contributes equally to total portfolio risk
- Risk & PortfolioStop-Loss StrategiesMechanical exit rules to limit drawdowns
- Risk & PortfolioVolatility-Based SizingNormalize position size by asset volatility
- ML MathGradient ClippingPreventing exploding gradients by capping their magnitude