ATR (Average True Range)
Average True Range is a volatility indicator. The 'true range' for any bar is the largest of: today's high minus today's low, the absolute value of today's high minus yesterday's close, or the absolute value of today's low minus yesterday's close. ATR is the average of true range over N bars (default 14).
What ATR is for
ATR doesn't predict direction — it sizes risk. A stop placed at entry − 2 × ATR adapts automatically: tight on quiet EUR/USD, wide on volatile Bitcoin. The same parameter works across markets.
Formula
TR = max(high − low, |high − close[1]|, |low − close[1]|)
ATR = ta.rma(TR, 14)
In Pine Script
atr = ta.atr(14)
stop_loss = strategy.position_avg_price - atr * 2See ATR Trend Follow for a complete volatility-adaptive strategy.
Strategies that use ATR (Average True Range)
Related Terms
Stop Reading. Start Trading.
PineForge backtests every concept on this site against real market data.
Try It Free