ATR Stop Loss and Signals Guide for TradingView
ATR trading signals for TradingView. Volatility-based stop placement, breakout signals, and trailing stop logic with Pine Script code and real examples from NQ and CL.
ATR Signal Interpretation
Quick-reference guide to 5 signal types you will see on the chart.
| Signal Type | Indicator Condition | Market Meaning | Reliability |
|---|---|---|---|
| ATR Breakout (Candle Close > Entry + 2 ATR) | Price closes above entry price plus 2 ATR. ATR is rising and above its 20-period average. | Volatility is expanding. The breakout has momentum behind it, not just noise. Most reliable when ATR was compressed for 5+ bars before the move. | 4/5 |
| ATR Trailing Stop (Chandelier Exit Long) | Price drops below the highest high of last 22 bars minus 3 ATR. | The trend is losing steam. ATR-based trailing stops adapt to volatility so they do not get triggered by normal noise. Works in trends but whipsaws in ranges. | 4/5 |
| ATR Compression / Squeeze (ATR below 20-period SMA) | ATR value drops below its 20-period simple moving average for 3 consecutive bars. | Volatility is contracting. A big directional move usually follows. The ATR squeeze alone does not tell you direction, only that a move is coming. | 3/5 |
| ATR Stop Loss Placement (2 ATR below entry) | Initial stop set at entry minus 2 ATR. Adjust to 1.5 ATR in low-volatility sessions like Asian forex hours. | Gives price enough room to breathe. A tight stop below 1 ATR gets picked off by noise. A stop wider than 3 ATR makes the risk-reward ratio unattractive on most setups. | 5/5 |
| ATR Volatility Reversal (ATR spike + overextended price) | ATR prints a 14-day high while price is more than 3 ATR from its 20-period EMA. | Volatility climax. Price is stretched and a mean reversion is likely within 1-3 bars. Works best at known support or resistance levels. | 3/5 |
ATR Pine Script Signal Code
Ready-to-use Pine Script code for generating buy/sell signals. Copy and paste into your TradingView Pine Editor.
//@version=5
indicator("ATR Signals and Stop Levels", overlay=true)
atrLen = input.int(14, "ATR Length")
multiplier = input.float(2.0, "ATR Multiplier", step=0.5)
showTrailing = input.bool(true, "Show Trailing Stop")
showBreakout = input.bool(true, "Show Breakout Signals")
squeezeLen = input.int(20, "Squeeze Lookback")
atrVal = ta.atr(atrLen)
smaAtr = ta.sma(atrVal, squeezeLen)
// Trailing stop (Chandelier Exit)
highestHigh = ta.highest(high, 22)
chandelierLong = highestHigh - atrVal * 3
trailingStop = showTrailing ? chandelierLong : na
// ATR-based breakout signal
atrExpanding = atrVal > smaAtr
breakoutLong = showBreakout and close > high[1] + (atrVal * multiplier) and atrExpanding
// Squeeze detection
squeezeActive = atrVal < smaAtr
squeezeBreak = squeezeActive[1] and not squeezeActive
// ATR bands for visual reference
upperBand = close + atrVal * multiplier
lowerBand = close - atrVal * multiplier
// Plots
plot(trailingStop, "Trailing Stop", color=color.new(#FF5252, 30), linewidth=2)
plot(upperBand, "Upper ATR Band", color=color.new(#2962FF, 60), linewidth=1)
plot(lowerBand, "Lower ATR Band", color=color.new(#2962FF, 60), linewidth=1)
plotshape(breakoutLong, "ATR Breakout", shape.triangleup, location.belowbar, color=#4CAF50, size=size.small)
plotshape(squeezeBreak, "Squeeze Release", shape.diamond, location.abovebar, color=#FF9800, size=size.small)
plotshape(squeezeActive and squeezeActive[1] == false, "Squeeze Start", shape.xcross, location.abovebar, color=#757575, size=size.small)
alertcondition(breakoutLong, "ATR Breakout Long", "ATR breakout long signal detected")
alertcondition(squeezeBreak, "ATR Squeeze Release", "Volatility squeeze release detected")
alertcondition(close < trailingStop, "ATR Trailing Stop Hit", "Price closed below ATR trailing stop")Recommended Parameters for ATR
Parameter settings tested across different market conditions and timeframes.
| Parameter | Default | Description |
|---|---|---|
| ATR Length | 14 | Lookback period for ATR calculation. ATR 14 is standard for daily charts. For 1h charts on NQ I use ATR 10 because 14 feels slow when volatility spikes at the open. |
| ATR Multiplier | 2.0 | Multiplier for stop distance and breakout threshold. 1.5 for tight stops on 5m scalping. 3.0 for swing stops on daily CL crude oil where gaps are common. |
| Squeeze Lookback | 20 | Bars used to calculate the ATR moving average for squeeze detection. 20 works on all timeframes. On 15m ES charts I find 30 produces fewer false squeeze signals. |
| Show Breakout Signals | true | Toggles breakout detection on the chart. Turn off if you only want the trailing stop. I keep it on for ES but turn it off for CL during news events when false breakouts spike. |
ATR + Pineify Invite-Only: Better Together
ATR alone gives you one signal type. Pineify invite-only indicator combines ATR with RSI divergences, MACD confirmation, and Supertrend filters in one overlay. Fewer charts, clearer signals.
Instead of switching between 5 different signals on separate charts, you get a single multi-confirmation setup.
See the Invite-Only IndicatorRelated Resources
FAQ
ATR Signals FAQ
Stop juggling ATR with 4 other charts
Pineify combines ATR, RSI, MACD, and Supertrend into one invite-only indicator. One click setup.
Try Pineify Free