KeltnerBandDown
KeltnerBandDown in ProBuilder returns the lower Keltner Channel band, the center line minus the average bar range over N periods. Syntax, formula, examples.
Syntax
KeltnerBandDown[N]Parameters
| Name | Type | Default | Description |
|---|---|---|---|
N | integer | required | Number of bars used for both the moving average of typical price and the average bar range. 14 and 20 are common settings. |
Formula
Center = Average[N]((high + low + close) / 3)
KeltnerBandDown = Center - Average[N](high - low)The same period N drives both averages, so a single parameter controls the whole band.
How it works
The lower band starts from the channel center, a simple moving average of typical price, and shifts it down by the average height of the last N bars. When volatility rises, bars get taller, the average range grows, and the band moves further from the center. When the market goes quiet, the band tightens toward the center line.
Because the offset is the average of (high - low), the band width reflects intrabar movement only. Gaps between one bar's close and the next bar's open do not enter the calculation, which is the main difference from ATR-based channel variants, since true range includes the gap to the prior close.
The function reads the instrument's high, low, and close directly. There is no (price) argument, and the band cannot be computed on a custom series.
Examples
Example 1, Lower band on a chart (Indicator)
// Lower Keltner band over 14 bars
lowerBand = KeltnerBandDown[14]
RETURN lowerBandPlots the lower boundary of the 14-period Keltner Channel. Combined with KeltnerBandCenter[14] and KeltnerBandUp[14] it draws the full channel.
Example 2, Buying dips in an uptrend (ProBacktest)
// Mean reversion: buy a close below the lower band while above the long-term trend
lower = KeltnerBandDown[20]
trend = Average[200](close)
IF NOT OnMarket AND close < lower AND close > trend THEN
BUY 1 CONTRACT AT MARKET
ENDIF
IF LongOnMarket AND close > KeltnerBandCenter[20] THEN
SELL AT MARKET
ENDIFTreats a close under the lower band as a stretched pullback, but only while price remains above its 200-bar average. The position exits when price rotates back to the channel center.
Example 3, Scanning for stretched instruments (ProScreener)
// Instruments closing below their lower Keltner band
lower = KeltnerBandDown[20]
stretch = 100 * (lower - close) / close
SCREENER[close < lower](stretch AS "Pct below band")Returns instruments whose close sits under the lower band, ranked by how far below it they trade.
Interpretation
A touch or close below the lower band means the current move is large relative to the average bar of the last N periods. In a range-bound market this often marks short-term exhaustion and precedes a rotation back toward the center line. In a downtrend the same signal means the trend is accelerating, and price can ride the lower band for many bars.
The distance between KeltnerBandDown and KeltnerBandUp doubles as a volatility gauge: a narrow channel signals compression, a widening channel signals expansion.
Common errors and gotchas
- No price argument.
KeltnerBandDown[14](close)does not compile. Only the period appears, in square brackets. - Range-based, not ATR-based. The band offset averages
(high - low)and ignores gaps. On instruments that gap frequently, this channel is narrower than an ATR-based version, and signals fire more often. A gap-aware variant can be built withAverageTrueRange. - Oversold traps in downtrends. Buying every close below the band performs poorly when the market is trending down, because the band keeps falling with price. Combine with a trend filter, as in Example 2.
- Mismatched periods. Mixing
KeltnerBandDown[14]withKeltnerBandCenter[20]produces lines from different windows that can cross each other. KeepNidentical across the three Keltner functions.
Related instructions
KeltnerBandCenter, the channel's middle line.KeltnerBandUp, the symmetric upper band.AverageTrueRange, gap-aware volatility measure for custom channel variants.BollingerDown, lower band of the standard deviation based alternative.DonchianChannelDown, lower channel line based on the lowest low.TypicalPrice, the(high + low + close) / 3series behind the center line.Average, the smoothing used for both channel components.Lowest, minimum of a series over a window, another support reference.
