477 views
Pivot high、Pivot lowを検出して
順張りしていくStrategyです。
※ TradingView内蔵のストラテジーを
上から順番に解説しています
※ 解説はコードの中で
※ コピペする場合は以下の変更を行ってください
[](全角の角括弧)→(半角の角括弧)
(全角スペース)→(半角スペース)
=====
//@version=4
strategy( "Pivot Extension Strategy の解説" ,overlay=true )
//計算用の設定値
leftBars = input(4)
rightBars = input(2)
// pivot high、pivot lowの算出
ph = pivothigh(leftBars, rightBars)
pl = pivotlow(leftBars, rightBars)
// pivot lowに該当する数値がある
if (not na(pl))
//成行で買いエントリー
strategy.entry("PivExtLE", strategy.long, comment="PivExtLE")
// pivot highに該当する数値がある
if (not na( ph ))
//成行で売りエントリー
strategy.entry("PivExtSE", strategy.short, comment="PivExtSE")
//確認用で描画
plot( ph ,style=plot.style_circles ,color=color.red ,linewidth=3 )
plot( pl ,style=plot.style_circles ,color=color.red ,linewidth=3 )
=====
順張りしていくStrategyです。
※ TradingView内蔵のストラテジーを
上から順番に解説しています
※ 解説はコードの中で
※ コピペする場合は以下の変更を行ってください
[](全角の角括弧)→(半角の角括弧)
(全角スペース)→(半角スペース)
=====
//@version=4
strategy( "Pivot Extension Strategy の解説" ,overlay=true )
//計算用の設定値
leftBars = input(4)
rightBars = input(2)
// pivot high、pivot lowの算出
ph = pivothigh(leftBars, rightBars)
pl = pivotlow(leftBars, rightBars)
// pivot lowに該当する数値がある
if (not na(pl))
//成行で買いエントリー
strategy.entry("PivExtLE", strategy.long, comment="PivExtLE")
// pivot highに該当する数値がある
if (not na( ph ))
//成行で売りエントリー
strategy.entry("PivExtSE", strategy.short, comment="PivExtSE")
//確認用で描画
plot( ph ,style=plot.style_circles ,color=color.red ,linewidth=3 )
plot( pl ,style=plot.style_circles ,color=color.red ,linewidth=3 )
=====
コメント:
次の講座
小次郎講師公式インジケーターのお申込
http://bit.ly/2vdSV4Q
小次郎講師のLINE@
http://bit.ly/2VZQFu3
小次郎講師のチャート情報局
http://bit.ly/2GvLAEp
http://bit.ly/2vdSV4Q
小次郎講師のLINE@
http://bit.ly/2VZQFu3
小次郎講師のチャート情報局
http://bit.ly/2GvLAEp