Data Analytic Investments
Volatility & BandsIntermediate

Keltner Channel

EMA-based volatility channel that uses ATR for band width — smoother than Bollinger Bands.

1H, 4H, Daily
Crypto, Forex, Equities
Pine Script v5

What is it?

Originally developed by Chester Keltner in 1960 and modernised by Linda Bradford Raschke, the Keltner Channel consists of a middle band (20-period EMA) and upper/lower bands at ±2× ATR from the EMA. Unlike Bollinger Bands (which use standard deviation), Keltner uses ATR for band width — this makes it smoother and less reactive to single-candle volatility spikes. The most powerful use of Keltner Channel is in combination with Bollinger Bands: when Bollinger Bands contract inside the Keltner Channel, it signals an extreme volatility squeeze (the 'TTM Squeeze') that often precedes a major breakout.

When to use it

  • Trend direction: price consistently closing above the upper Keltner band signals a strong uptrend; below the lower band signals a strong downtrend.
  • TTM Squeeze: when Bollinger Bands (20, 2) are entirely inside the Keltner Channel (20, 1.5), the market is in an extreme squeeze — prepare for a breakout.
  • Mean reversion: in a ranging market, price touching the upper band is a potential short; touching the lower band is a potential long.
  • Breakout confirmation: a close above the upper Keltner band on high volume is a trend-continuation signal.
  • Stop placement: use the middle EMA as a dynamic stop for trend trades — exit if price closes below the EMA in an uptrend.

Common pitfalls

  • Keltner Channel and Bollinger Bands look similar but behave differently. Keltner is smoother; Bollinger is more reactive. Using them interchangeably leads to errors.
  • The TTM Squeeze (BB inside KC) identifies that a move is coming — not the direction. Use momentum indicators (MACD histogram, RSI) to determine direction.
  • In strong trending markets, price can walk the upper or lower Keltner band for extended periods. Fading the band in a trend is a losing strategy.
  • The ATR multiplier (default 2×) significantly affects band width. A 1.5× multiplier produces tighter bands with more signals; 2.5× produces wider bands with fewer.
  • Keltner Channel uses an EMA as the middle band, which means it lags. In fast-moving crypto markets, the channel can be significantly behind current price action.

Free code template

Paste directly into TradingView Pine Editor → Add to chart.

Pine Script v5
/indicator("Keltner Channel + Squeeze — DAI Template", overlay=true)

kcLen  = input.int(20,   "KC Length",      minval=1)
kcMult = input.float(2.0, "ATR Multiplier", step=0.25)
bbLen  = input.int(20,   "BB Length (Squeeze)", minval=1)
bbMult = input.float(2.0, "BB Multiplier",      step=0.25)

// Keltner Channel
kcMid   = ta.ema(close, kcLen)
kcUpper = kcMid + ta.atr(kcLen) * kcMult
kcLower = kcMid - ta.atr(kcLen) * kcMult

// Bollinger Bands (for squeeze detection)
[bbMid, bbUpper, bbLower] = ta.bb(close, bbLen, bbMult)

// TTM Squeeze: BB inside KC
squeeze = bbUpper < kcUpper and bbLower > kcLower

pKcU = plot(kcUpper, "KC Upper", color=color.new(#0891b2, 20), linewidth=1)
pKcL = plot(kcLower, "KC Lower", color=color.new(#0891b2, 20), linewidth=1)
pKcM = plot(kcMid,   "KC Mid",   color=color.new(#0891b2, 50), linewidth=1)
fill(pKcU, pKcL, color.new(#0891b2, 92))

plotshape(squeeze, "Squeeze", shape.circle, location.bottom,
          color=#fbbf24, size=size.tiny, title="TTM Squeeze")
bgcolor(squeeze ? color.new(#fbbf24, 94) : na)

alertcondition(squeeze,          "Squeeze Active",  "Keltner Squeeze detected — breakout imminent")
alertcondition(squeeze[1] and not squeeze, "Squeeze Released", "Keltner Squeeze released")