kcw
kcw
ケルトナーチャネル幅。ケルトナーチャネル幅は上下のケルトナーチャネルの差を中央のチャネルで割ったものです。
kcw(series, length, mult) → series[float]
kcw(series, length, mult, useTrueRange) → series[float]
例
//@version=4
study('My Script')
plot(kcw(close, 5, 4), color=color.yellow)
// the same on pine
f_kcw(src, length, mult, useTrueRange) =>
float basis = ema(src, length)
float range = (useTrueRange) ? tr : (high - low)
float rangeEma = ema(range, length)
((basis + rangeEma * mult) - (basis - rangeEma * mult)) / basis
plot(f_kcw(close, 5, 4, true))
戻り
ケルトナーチャネル幅。
引数
series (series) 処理する値の系列。
length (integer) バーの数(長さ)。
mult (float) 標準偏差ファクター
useTrueRange (bool) オプションパラメーター。トゥルー・レンジを利用するかを指定します。デフォルトは true です。false の場合、レンジは以下の式で計算されます (high – low)。