yuya_takahashi_

Pine講座㊴ バックテスト|BarUpDn Strategy の解説(ローソク足の上下による途転戦略)

Education
FX:USDJPY   U.S. Dollar / Japanese Yen
TradingView内蔵のストラテジー
「BarUpDn Strategy」の解説です。

「陰線か陽線」と「前日終値と始値の位置関係」だけでトレードする、
非常にシンプルなストラテジーです。

ノイズの多い銘柄には向かない印象です。

※ TradingView内蔵のストラテジーを
  上から順番に解説しています

※ 解説はコードの中で

※ コードをコピペする場合は、[](全角)を (半角)に変更してください

=====
//@version=4
//default_qty_type = strategy.percent_of_equity, default_qty_value = 10 で
//「1エントリーのサイズを資金の10%にする」という設定を行っています
strategy("BarUpDn Strategy の解説", overlay=true, default_qty_type = strategy.percent_of_equity, default_qty_value = 10)

//1日の中の損失限度を資金に対する%で設定します
maxIdLossPcnt = input(1, "Max Intraday Loss(%)", type=input.float)
strategy.risk.max_intraday_loss(maxIdLossPcnt, strategy.percent_of_equity)

//陽線&始値>前日終値
if (close > open and open > close[1])
//買いエントリー
strategy.entry("BarUp", strategy.long)
//陰線&始値<前日終値
if (close < open and open < close[1])
//売りエントリー
strategy.entry("BarDn", strategy.short)
=====
Comment:
前の講座

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

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

小次郎講師のチャート情報局
bit.ly/2GvLAEp
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.