volatility indicator
Average True Range (ATR)
ATR measures market volatility by calculating the average of true range values over a period. It does not indicate trend direction — only how much an asset moves, on average, per period.
Formula
True Range = max(High - Low, |High - PrevClose|, |Low - PrevClose|) ATR = SMA or EMA(N) of True Range where N = period (default 14)
Common strategies
- Volatility-based stop loss: Place stops at entry ± (ATR × multiplier), e.g., 2× ATR, to account for normal volatility.
- Position sizing: Scale position size inversely to ATR — higher ATR means smaller positions to maintain consistent risk.
- Breakout confirmation: A sudden ATR spike often precedes or confirms a breakout from a consolidation range.
How CommonQuant uses it
CommonQuant pre-calculates ATR(14) on all timeframes. DSL strategies can reference atr(period) for volatility-adjusted stops and position sizing logic.
Frequently asked questions
Is ATR a buy or sell signal?
No. ATR measures volatility, not direction. A rising ATR means increasing volatility (potential breakout or trend change); a falling ATR means decreasing volatility (consolidation).
How do I use ATR for a stop loss?
A common approach is the "chandelier exit": place your stop at the highest high since entry minus 3× ATR (for longs). This adapts the stop to current volatility.