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| Parameter | Type | Required | Description |
|---|---|---|---|
source | series float | yes | The series the channels are built on. |
length | series int | yes | How many bars the calculation covers. |
mult | series int | yes | Band multiplier. An int, not a float: a fractional multiplier is refused when the script is checked, and there is no rounding. |
useTrueRange | series bool | no | Optional 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.