Volatility breakout
A directional-neutral breakout trigger that scales naturally to any asset's typical range.
Average True Range
A non-directional measure of volatility: the average size of the bar-to-bar true range over a chosen lookback.
ATR is a non-directional volatility indicator that measures the average size of recent bar ranges. Developed by J. Welles Wilder, it uses 'true range' (which accounts for gaps) and smooths it over 14 bars by default. Used for stop-loss sizing, position sizing, and volatility-regime filtering — not for direction.
Average True Range, introduced by J. Welles Wilder, measures volatility by averaging the true range over N bars (typically 14). True range itself is the greatest of: current high minus current low, the absolute value of current high minus previous close, and the absolute value of current low minus previous close.
ATR tells you nothing about direction — only about how much the asset is moving on average. That makes it the workhorse of risk management: position sizing, stop-loss placement, take-profit targets, and volatility-regime filtering. It also pairs well with any directional indicator to size trades dynamically to current conditions.
Entry ideas
A directional-neutral breakout trigger that scales naturally to any asset's typical range.
An early-accumulation long that scales into symbols coiling for a breakout.
Exit ideas
The staple volatility-adaptive exit for trend-following systems.
A volatility-aware fixed target that gives consistent risk-reward across any asset.
An early-exit rule that closes trades when the move dies even before price reverses.
Utilities
A discipline filter that skips entries on bars that have already moved too far, avoiding chasing.
A regime filter that protects P&L by sitting out dead-flat markets.
A profit-locking trailing stop that tightens as the trade extends, giving volatility room.
| Parameter | Default | When to adjust |
|---|---|---|
| Length | 14 | Wilder's original setting. Drop to 7 for faster volatility adaptation; raise to 21 for smoother readings on noisy assets. |
| Smoothing method | Wilder (RMA) | Pine's ta.atr() uses Wilder's smoothing by default. Custom EMA-based ATRs produce different (faster) values. |
| Stop multiplier | 1.5–3.0 | Common range for ATR-based stops. Tighter (1.5) for quick scalp trades; wider (3.0) for trend-following positions. |
| Take-profit multiplier | 2.0–5.0 | Set risk-reward target as multiple of ATR. 2× ATR target is conservative; 5× is for trend riders. |
//@version=5
indicator("ATR Example", overlay=false)
length = input.int(14, title="Length", minval=1)
multStop = input.float(2.0, title="Stop Multiplier", minval=0.1, step=0.1)
atrValue = ta.atr(length)
plot(atrValue, title="ATR", color=color.purple, linewidth=2)
// Position-sizing reference (in price units):
// stopDistance = atrValue * multStop
// e.g., long entry at close, stop = close - stopDistancePine's ta.atr() returns ATR directly — it bundles the True Range calculation and Wilder smoothing internally. ATR plots as a single line in its own pane. To use it for stops, multiply by your chosen multiplier and subtract from entry price. The commented lines show the pattern most strategies use for ATR-based stop placement.
ATR averages the true range over a chosen lookback period. True range is the largest of three measurements that account for both within-bar movement and gap risk.
ATR does not really "fail" — it accurately measures volatility. The failures come from misusing it.
Confusing magnitude for direction. ATR rising tells you bars are getting bigger; it does not tell you whether price is going up or down. Treating ATR like a directional indicator produces nonsense signals.
Using ATR alone for entries. ATR has no buy/sell logic embedded — it is a sizing and risk-management tool. Strategies that fire entries on "ATR crosses X" rarely have edge because they are trading volatility shifts, not directional bias.
Stop multipliers on illiquid assets. A 2× ATR stop on a thinly traded crypto pair can be wider than the typical retracement, leading to trades that should have stopped out riding into ruin.
Pair ATR with a directional indicator (EMA, MACD, Supertrend) for entry logic and use ATR purely for sizing, stops, and regime filtering.
| Indicator | When to prefer |
|---|---|
| Bollinger Bands | Bollinger Bands give volatility-adjusted price levels (where the bands sit); ATR gives volatility magnitude in raw price units. Use BB for entry context, ATR for risk sizing. |
| Standard deviation | Standard deviation is symmetrical around the mean (used in Bollinger Bands); ATR uses true range and accounts for gaps. For gap-prone assets like stocks at the open, ATR is more accurate. |
| Supertrend | Supertrend uses ATR internally to size its trend-following stop. If you want a directional signal with built-in volatility-aware stops, use Supertrend. If you want raw volatility data, use ATR directly. |
ATR uses 'true range,' which captures price gaps (e.g., overnight moves on stocks). Standard deviation uses bar-to-bar closes, missing intraday movement and gaps. For risk management on gap-prone assets like stocks or crypto over weekends, ATR gives a more accurate volatility picture.
A 2× ATR stop is a common starting point — wide enough to avoid normal retracements, tight enough to limit damage on a wrong call. For trend-following systems holding multi-day, 3× ATR is more typical. For scalp strategies on 1–5 min charts, 1× ATR is common. Always backtest the multiplier on your specific asset and timeframe.
Yes — ATR works on any asset with continuous OHLC data. Crypto's high volatility and 24/7 markets make ATR particularly useful for sizing: a fixed-percentage stop that works on stocks gets blown out on Bitcoin, while ATR-based stops scale with each pair's actual volatility.
Decide a fixed dollar risk per trade (say 1% of account). Compute the stop distance as N × ATR (e.g., 2× ATR). Position size = dollar risk ÷ stop distance. This gives equal dollar exposure across volatility regimes — fewer shares of volatile assets, more of calm ones.
Continue exploring
Bollinger Bands
A volatility envelope built from a moving average and ±2 standard deviations, expanding and contracting as volatility changes.
View BBMomentumRelative Strength Index
A momentum oscillator that measures the speed and magnitude of recent price changes on a bounded 0–100 scale.
View RSITrendMoving Average Convergence Divergence
A trend-momentum indicator built from the difference between two EMAs, plus a signal line and histogram that visualise momentum shifts.
View MACDAbout these ideas
Each entry, exit, and utility rule in the Playbook is hand-picked from established trading literature, validated against historical backtests, and reviewed by the PineWiz team. We add new ideas as we encounter them and refresh existing ones when market behavior or default settings shift. Last review: .
Educational content. Not financial advice.