talib.kcw

Keltner channel width for source over length bars: one figure in place of the three the channel call returns. The argument list matches talib.kc, useTrueRange included.

talib.kcw(series float source, series int length, series int mult, series bool useTrueRange) → series float
ParameterTypeRequiredDescription
sourceseries floatyesThe series the channels are built on.
lengthseries intyesHow many bars the calculation covers.
multseries intyesBand multiplier. An int, not a float: a fractional multiplier is refused when the script is checked, and there is no rounding.
useTrueRangeseries boolnoOptional flag selecting true range for the width.

Returns series float — A single series float: the width.

indicator("Keltner channel width")
plot(talib.kcw(close, 20, 2))

See also talib.alma · talib.atr · talib.barssince

Part of the function index.

Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.
Upgrade