Indicators··6 min read

Keltner Channel vs Bollinger Band Overlay

0 references, link-verified · inline [n] markersEditor of record: Shane CantyStandards review editorial standard · audit log

Keltner Channels and Bollinger Bands both measure price volatility around a central trend line, but use different foundations: Keltner Channels employ the Average True Range (ATR), while Bollinger Bands rely on standard deviation. Comparing them on a single chart reveals how two volatility models react differently to real-time market conditions. Traders use this overlay to identify periods where both bands contract or expand in agreement, signal potential breakouts, or detect when price anchors to one band vs the other, helping confirm volatility regimes and support or resistance zones.

//@version=6
indicator("Keltner Channel vs Bollinger Band Overlay", overlay=true)

// Keltner Channel inputs
kc_length = input(20, "KC Length", minval=1)
kc_atr_mult = input(1.5, "KC ATR Multiplier", step=0.1)
kc_ema_src = input(close, "KC Source")

// Bollinger Bands inputs
bb_length = input(20, "BB Length", minval=1)
bb_std_dev = input(2.0, "BB Std Dev", step=0.1)
bb_sma_src = input(close, "BB Source")

// Keltner Channel calculation
kc_ema = ta.ema(kc_ema_src, kc_length)
kc_atr = ta.atr(kc_length)
kc_upper = kc_ema + (kc_atr * kc_atr_mult)
kc_lower = kc_ema - (kc_atr * kc_atr_mult)

// Bollinger Bands calculation
bb_sma = ta.sma(bb_sma_src, bb_length)
bb_std = ta.stdev(bb_sma_src, bb_length)
bb_upper = bb_sma + (bb_std * bb_std_dev)
bb_lower = bb_sma - (bb_std * bb_std_dev)

// Plot Keltner Channel
plot(kc_ema, "KC Middle", color=color.blue, linewidth=2)
p1 = plot(kc_upper, "KC Upper", color=color.new(color.blue, 60), linewidth=1)
p2 = plot(kc_lower, "KC Lower", color=color.new(color.blue, 60), linewidth=1)
fill(p1, p2, color=color.new(color.blue, 90), title="KC Fill")

// Plot Bollinger Bands
plot(bb_sma, "BB Middle", color=color.orange, linewidth=2)
p3 = plot(bb_upper, "BB Upper", color=color.new(color.orange, 60), linewidth=1)
p4 = plot(bb_lower, "BB Lower", color=color.new(color.orange, 60), linewidth=1)
fill(p3, p4, color=color.new(color.orange, 90), title="BB Fill")

How the code works

The script calculates two separate volatility envelopes. The Keltner Channel uses a 20-period exponential moving average (EMA) as its centerline, then projects the current Average True Range upward and downward by a multiplier (default 1.5). The ATR captures the true range of intrabar movement, making it reactive to gaps and limit moves. The Bollinger Bands use a 20-period simple moving average (SMA) and add or subtract a number of standard deviations (default 2.0) of the closing price from that average. Standard deviation reflects how far price deviates from the mean historically, so it weights clustering differently than range-based models.

Both envelopes plot as filled zones. The blue lines represent Keltner; orange represent Bollinger Bands. The middle lines show the two trend anchors (EMA vs SMA). All inputs are adjustable: band length, ATR multiplier, and standard deviation count. Each indicator reads from the close price by default, but the source can be changed independently.

Reading it on a chart

When the two bands overlap closely, both volatility models agree: market structure is stable. If the orange Bollinger zone lies entirely within the blue Keltner zone, price clustering is tighter than recent true range suggests, which often precedes a move. Conversely, if Bollinger Bands exceed Keltner Channels, price variance is unusually high relative to typical true range: often seen in news-driven spikes or late-stage trends. Traders also watch which band price touches. Repeated touches of the outer Bollinger Band (orange) alongside the outer Keltner Band (blue) strengthen signal that price is overextended; touch only one outer band while the other is distant weakens conviction.

The two middle lines (blue EMA, orange SMA) may diverge, especially after sharp moves. A steep EMA that pulls away from the SMA signals that recent price action (which EMA weights more) is momentum-driven. Price holding between the two midlines suggests a consolidation phase. Band width (distance between upper and lower) compresses into "squeeze" conditions, which many traders associate with breakout setups; examining whether both bands narrow simultaneously or one tightens while the other loosens hints at which volatility model is leading.

Limitations

This overlay displays two models without prescribing which to trust. In choppy, range-bound markets, both bands can be legitimately wide, creating ambiguity: wide bands do not guarantee a breakout is coming. ATR-based Keltner Channels respond faster to recent gaps, so they may expand or contract before Bollinger Bands do; this lag in Bollinger Bands (which use standard deviation across the full lookback period) can cause false divergence signals. Neither band predicts direction, and price can remain just outside a band for extended periods without reverting.

The multipliers and lookback periods are conventional starting points, not optimal for all assets or timeframes. A 20-period band on a 1-minute chart behaves entirely differently from a 20-period band on a daily chart; the indicator offers no automatic scaling. Standard deviation assumes a roughly normal distribution of price changes, which equity and commodity markets violate during crisis periods and high-volatility regimes. ATR can spike during a single gap move, widening Keltner Channels dramatically even if the subsequent true range reverts, leading to false expansion signals. Backtesting overlay patterns (band convergence, price touching one band but not the other) requires careful handling of lookahead bias and transaction costs; visual confirmation on a chart does not guarantee edge in live trading.

Key definitions

Average True Range (ATR): A volatility measure that captures the largest of the current period's range, the gap between close and prior close, accounting for gaps and limit moves. [1]

Keltner Channel: A volatility envelope centered on an exponential moving average, with upper and lower bands set at multiples of the ATR. [2]

Bollinger Bands: A volatility envelope centered on a simple moving average, with upper and lower bands set at standard deviations above and below that average. [3]

Standard Deviation: A statistical measure of how far individual data points spread from their mean; applied to price, it quantifies historical clustering or dispersion. [4]

Exponential Moving Average (EMA): A weighted moving average that gives higher weight to recent prices, responding faster to price changes than a simple moving average. [4]

Squeeze: A condition where both upper and lower bands of a volatility indicator contract sharply, signaling low volatility and often preceding a significant price move. [3]

References

  1. Wilder, J. Welles, New Concepts in Technical Trading Systems, Trend Research (1978). ISBN: 0894590454.

  2. Raschke, Linda Bradford, and Connors, Lawrence A., Street Smarts: High Probability Short-Term Trading Strategies, M. Gordon Publishing Group (1995). Discussion of Keltner Channel construction and application.

  3. Bollinger, John, Bollinger on Bollinger Bands, McGraw-Hill (2002). ISBN: 0071373683.

  4. Investopedia, "Exponential Moving Average (EMA)" and "Standard Deviation", Investopedia (2024). Https://www.investopedia.com/

  5. CME Group, "Average True Range (ATR)", CME Education Resources (2024). Https://www.cmegroup.com/

  6. Schwager, Jack D., Technical Analysis from A to Z, McGraw-Hill (1995). Full reference for volatility envelopes and ATR mechanics.


Educational research on historical data only. Not investment advice, not a signal, and never a performance promise. Past results do not predict future performance. Every reference is link-verified before publication and every paper is re-audited weekly against the library's editorial standard.

Last reviewed by the PropLedger research pipeline: 2026-10-11. Educational research on historical data, not financial advice.

Educational research on historical data only. Not investment advice, not a signal, and never a performance promise. Past results do not predict future performance. Every reference is link-verified before publication and every paper is re-audited weekly against the library's editorial standard. Found an error? Email support@prop-ledger.org and the paper is corrected or withdrawn.