Keltner Channels
Created by Chester W. Keltner, Keltner Channels are based on an EMA centerline and ATR band widths. See also STARC Bands for an SMA centerline equivalent. [Discuss] 💬

// C# usage syntax
IEnumerable<KeltnerResult> results =
quotes.GetKeltner(emaPeriods, multiplier, atrPeriods);
Parameters
emaPeriods int - Number of lookback periods (E) for the center line moving average. Must be greater than 1 to calculate. Default is 20.
multiplier double - ATR Multiplier. Must be greater than 0. Default is 2.
atrPeriods int - Number of lookback periods (A) for the Average True Range. Must be greater than 1 to calculate. Default is 10.
Historical quotes requirements
You must have at least 2×N or N+100 periods of quotes, whichever is more, where N is the greater of E or A periods, to cover the warmup and convergence periods. Since this uses a smoothing technique, we recommend you use at least N+250 data points prior to the intended usage date for better precision.
quotes is a collection of generic TQuote historical price quotes. It should have a consistent frequency (day, hour, minute, etc). See the Guide for more information.
Response
IEnumerable<KeltnerResult>
- This method returns a time series of all available indicator values for the
quotesprovided. - It always returns the same number of elements as there are in the historical quotes.
- It does not return a single incremental indicator value.
- The first
N-1periods will havenullvalues since there’s not enough data to calculate.
âšž Convergence warning: The first
N+250periods will have decreasing magnitude, convergence-related precision errors that can be as high as ~5% deviation in indicator values for earlier periods.
KeltnerResult
Date DateTime - Date from evaluated TQuote
UpperBand double - Upper band of Keltner Channel
Centerline double - EMA of price
LowerBand double - Lower band of Keltner Channel
Width double - Width as percent of Centerline price. (UpperBand-LowerBand)/Centerline
Utilities
See Utilities and helpers for more information.
Chaining
This indicator is not chain-enabled and must be generated from quotes. It cannot be used for further processing by other chain-enabled indicators.