Functions
talib.kc()
Keltner channels for `source` over `length` bars, with `mult` setting the distance to the outer bands. An optional `useTrueRange` flag selects true range for the width calculation. As with `talib.bb`, `mult` is an int, so a fractional multiplier is not accepted.
Syntax
talib.kc(series float source, series int length, series int mult, series bool useTrueRange) → [series float, series float, series float]
Arguments
source required series float Series of values to process. length required series int Number of bars (length). mult required series int Standard deviation factor. useTrueRange series bool Return Type
[series float, series float, series float] Example
//@lipi=2
indicator("Keltner Channels", overlay=true)
length = input(20, "Length")
mult = input.int(2, "Multiplier")
source = input(close, "Source")
[kcLower, kcMiddle, kcUpper] = talib.kc(source, length, mult)
plot(kcUpper, color=color.blue, title="Upper KC")
plot(kcMiddle, color=color.gray, title="Middle KC")
plot(kcLower, color=color.red, title="Lower KC")