Indicators··7 min read

Keltner Channels vs Bollinger Bands Overlay

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

Keltner Channels and Bollinger Bands are both volatility envelopes that plot upper and lower boundaries around price, yet they measure volatility differently. Keltner Channels use Average True Range (ATR), which captures the full price movement range; Bollinger Bands use standard deviation of closing prices. Overlaying both on a single chart reveals where the two methods agree and diverge, helping traders identify which volatility regime the market is in and whether bands are tightening or widening asymmetrically. The overlay is useful for traders seeking a more complete picture of market volatility structure than either indicator alone provides.

//@version=6
indicator("Keltner Channels vs Bollinger Bands", overlay=true)

// Keltner Channel inputs
kcLength = input.int(20, title="KC Length", minval=1)
kcATRLength = input.int(10, title="KC ATR Length", minval=1)
kcATRMultiplier = input.float(2.0, title="KC ATR Multiplier", step=0.1)

// Bollinger Bands inputs
bbLength = input.int(20, title="BB Length", minval=1)
bbMultiplier = input.float(2.0, title="BB Multiplier", step=0.1)

// Keltner Channel calculation
kcBasis = ta.sma(close, kcLength)
kcATR = ta.atr(kcATRLength)
kcUpper = kcBasis + kcATRMultiplier * kcATR
kcLower = kcBasis - kcATRMultiplier * kcATR

// Bollinger Bands calculation
bbBasis = ta.sma(close, bbLength)
bbStdDev = ta.stdev(close, bbLength)
bbUpper = bbBasis + bbMultiplier * bbStdDev
bbLower = bbBasis - bbMultiplier * bbStdDev

// Plot Keltner Channels
pKCU = plot(kcUpper, title="KC Upper", color=color.new(color.blue, 0), linewidth=1)
pKCL = plot(kcLower, title="KC Lower", color=color.new(color.blue, 0), linewidth=1)
plot(kcBasis, title="KC Basis", color=color.blue, linewidth=1, linestyle=plot.style_dashed)

// Plot Bollinger Bands
pBBU = plot(bbUpper, title="BB Upper", color=color.new(color.red, 0), linewidth=1)
pBBL = plot(bbLower, title="BB Lower", color=color.new(color.red, 0), linewidth=1)
plot(bbBasis, title="BB Basis", color=color.red, linewidth=1, linestyle=plot.style_dashed)

// Fill regions for visual clarity
fill(pKCU, pKCL, title="KC Fill", color=color.new(color.blue, 85))
fill(pBBU, pBBL, title="BB Fill", color=color.new(color.red, 85))

How the code works

The script calculates both bands simultaneously using their respective volatility formulas. For Keltner Channels, a 20-period simple moving average (SMA) serves as the basis line, and the ATR, a measure of average price movement over a lookback window, is multiplied by a scalar (default 2.0) to set the band distance [1]. The ATR captures the real range: the maximum of the current day's high-low spread, or the gaps from prior close to current high or low, making it responsive to gaps and limit moves. For Bollinger Bands, the same-length SMA forms the center, but the band width is set by the standard deviation of closing prices over that period, multiplied by the same scalar [2]. Standard deviation measures how far prices typically deviate from their average, so it weights normal closing-price variation more heavily and ignores intraday range.

Both bases are plotted as dashed lines; the upper and lower edges as solid lines. Blue shading represents Keltner Channels and red represents Bollinger Bands, each with semi-transparency so both regions remain visible. All key parameters are exposed as inputs: the moving average period, ATR lookback, and band width multipliers. This allows users to adjust the bands without modifying the script, and to experiment with different sensitivity settings for their market and timeframe.

Reading it on a chart

When Keltner Channels sit entirely outside Bollinger Bands (Keltner wider), the market has experienced significant intraday movement relative to closing-price variance. This often occurs in trending or volatile markets where price gaps or reversals within bars are pronounced. Conversely, when Bollinger Bands widen beyond Keltner Channels, closing prices are spread more than the true range alone would suggest, pointing to cases where price closed far from the open (large bodies) or where closing prices have become dispersed relative to their recent average.

Overlap of the two bands indicates that both volatility measures align, suggesting a balanced market structure. When price trades between the Keltner basis and the outer Bollinger Band but outside Keltner, a trader observes tightness in true range coupled with larger closing-price swings, often signaling indecision or a congestion breakout. Traders may also track when either pair of bands contracts sharply, suggesting a volatility compression that historically precedes larger moves; comparing both measures can confirm whether the squeeze is real across both definitions or skewed by one method's sensitivity.

Limitations

Both Keltner Channels and Bollinger Bands are lagging indicators constructed from historical price data, so they do not predict future price direction or volatility. They describe the past, not the future. ATR and standard deviation both assume that recent volatility will persist; in reality, volatility regimes shift suddenly, and both bands can lag market regime changes by several periods. A sharp spike in volume or a gap opening can violate both bands immediately, rendering them ineffective as real-time support or resistance during such events.

The overlay introduces visual complexity: six lines on a chart can obscure price action rather than clarify it, especially on crowded timeframes. Selecting appropriate lengths and multipliers requires tuning; default values (20-period SMA, 2.0 multiplier) work reasonably on daily charts for major currency pairs or indices but may be inadequate on intraday timeframes or illiquid assets where volatility clusters unpredictably.

ATR and standard deviation respond differently to the same price environment. A market with large opening gaps but tight closes will show wide Keltner Channels and narrow Bollinger Bands. Conversely, a quiet open followed by a late-session reversal can widen Bollinger Bands while ATR remains stable. Neither response is "correct": they simply weight volatility differently. Traders who rely on band crossovers for entry or exit signals may find conflicting signals from the two methods simultaneously.

Finally, band width is not a signal in itself. Many traders assume tight bands precede large moves, but this relationship is not guaranteed and can be unreliable over short windows. Using band width as a standalone trigger without additional confirmation from volume, price structure, or other indicators risks false signals and whipsaws.

Key definitions

Average True Range (ATR): The moving average of the true range, a measure that captures the maximum of the current high-low spread, or the gaps from prior close to current high or low, over a specified lookback period [1].

Bollinger Bands: A volatility envelope constructed from a moving average and bands set at a fixed multiple of the standard deviation of closing prices, forming an upper and lower boundary [2].

Keltner Channels: A volatility envelope constructed from a moving average basis and bands set at a fixed multiple of the Average True Range, capturing full price movement range rather than closing-price dispersion.

Standard Deviation: A statistical measure of how far values deviate from their average; in the context of Bollinger Bands, it measures the dispersion of closing prices over a lookback period.

Lagging Indicator: An indicator calculated from historical price data that describes the past and adapts to current market conditions with a delay, as opposed to leading indicators that attempt to predict future direction.

Volatility Regime: A distinct period of market behavior characterized by a consistent level of price movement; regimes can shift from low to high volatility or from trending to ranging suddenly and without warning.

References

  1. Wilder, J.W., New Concepts in Technical Trading Systems. Trend Research (1978).
  2. Bollinger, J., Bollinger on Bollinger Bands. McGraw-Hill (2002).
  3. CME Group, "Average True Range (ATR) Technical Indicator", CME Education. Https://www.cmegroup.com/
  4. Investopedia, "Keltner Channel: Definition and Calculation", Investopedia. Https://www.investopedia.com/
  5. Investopedia, "Bollinger Bands: Definition, Uses, and Settings", Investopedia. Https://www.investopedia.com/
  6. TASC (Technical Analysis of Stocks and Commodities), Cycles and Patterns in Price Action, Various authors and issues.

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-09-27. 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.