atr

atr

atr関数 (アベレージ・トゥルー・レンジ) は、トゥルー・レンジのRMAを返します。
トゥルー・レンジは max(high – low, abs(high – close[1]), abs(low – close[1])) です。

atr(length) → series[float]

plot(atr(14))

//the same on pine
pine_atr(length) =>
    trueRange = na(high[1])? high-low : max(max(high - low, abs(high - close[1])), abs(low - close[1]))
    //true range can be also calculated with tr(true)
    rma(trueRange, length)

plot(pine_atr(14))

戻り
正しい幅の平均。

引数
length (integer) 長さ(背景バーの長さ)

\ 最新情報をチェック /

コメントを残す

Pineスクリプト

前の記事

atan
Pineスクリプト

次の記事

avg