yuya_takahashi_

Pine講座⑥ エンベロープを表示する

Education
FX:USDJPY   U.S. Dollar / Japanese Yen
今日はエンベロープを表示してみます。
数値は足種や銘柄に応じて調整をする必要があります。


=====
//@version=3
study( "エンベロープを表示する" ,overlay=true )

price = input( close ,title="EMAの対象" )
length = input( 20 ,title="EMAの期間" )

ema = ema( price ,length )

plot( ema + ema * 0.04 ,linewidth=2 )
plot( ema + ema * 0.03 )
plot( ema + ema * 0.025 ,transp=75 )
plot( ema + ema * 0.02 )
plot( ema + ema * 0.015 ,transp=75 )
plot( ema + ema * 0.01 ,color=red )

plot( ema ,color=red )

plot( ema - ema * 0.01 ,color=red )
plot( ema - ema * 0.015 ,transp=75 )
plot( ema - ema * 0.02 )
plot( ema - ema * 0.025 ,transp=75 )
plot( ema - ema * 0.03 )
plot( ema - ema * 0.04 ,linewidth=2 )
=====


このように、Pineスクリプトを使えば、
何本でも移動平均線を表示することができます。

今日、新しく出てきたのは「transp」。
これは plot( ) する線の透明度を調整することができる項目です。
100にすると透明度が100%で、何も表示されなくなります。
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.