cmo

cmo

シャンデ・モメンタム・オシレーター。
直近の上昇と下降の値幅の合計の差を計算し、その結果を同じ期間のすべての値幅合計で割ります。

cmo(series, length) → series[float]

study('My Script')
plot(cmo(close, 5), color=color.yellow)

// the same on pine
f_cmo(src, length) =>
    float mom = change(src)
    float sm1 = sum((mom >= 0) ? mom : 0.0, length)
    float sm2 = sum((mom >= 0) ? 0.0 : -mom, length)
    return = 100 * (sm1 - sm2) / (sm1 + sm2)

plot(f_cmo(close, 5))

戻り
シャンデ・モメンタム・オシレーター。

引数
series (series) 処理する値の系列。
length (integer) バーの数(長さ)。

\ 最新情報をチェック /

コメントを残す

Pineスクリプト

前の記事

change
Pineスクリプト

次の記事

cog