yuya_takahashi_

Pine講座⑪ 2行でATRを表示する

Education
FX:USDJPY   U.S. Dollar / Japanese Yen
Pineスクリプトはオシレーター系の指標の描画も簡単です。
ほとんどの指標を2行で出力できると思います。

今日はATR。

=====
//@version=3
study( "2行でATRを表示する" )
plot( ema( tr ,20 ) )
=====

Pineスクリプトでは、「tr」という独自変数があります。
これは、close、openなどと同じようにtr(True Range)を取得することができる変数です。

atr( ) という関数も用意されていますが、
EMA(指数平滑移動平均)のATRが欲しいので ema( tr ,20 ) として算出しています。
Comment:
次の講座

小次郎講師公式インジケーターのお申込
bit.ly/2vdSV4Q

小次郎講師のLINE@
bit.ly/2VZQFu3

小次郎講師のチャート情報局
bit.ly/2GvLAEp

Related Ideas

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.