yuya_takahashi_

Pine講座54 期間を区切ってバックテストを行う

Eğitim
yuya_takahashi_ Güncellendi   
FX:USDJPY   ABD Doları / Japon Yeni
期間を区切って
バックテストを行うこともできます。

検証を比較する際に、
銘柄によって期間がまちまちだと
正確に行うことができません。

検証の各条件を揃えることで、
Pineスクリプトであってもしっかりと比較することができます。

※ 解説はコードの中で

※ コピペする場合は以下の変更を行ってください
[](全角の角括弧)→(半角の角括弧)
(全角スペース)→(半角スペース)

=====
//@version=4
strategy( "STOP LIMIT の解説" ,overlay=true )

is_test_datetime = timestamp(2019,9,5,0,0) <= time and time <= timestamp(2019,9,6,0,0)
bgcolor( is_test_datetime ? color.gray : color.white )

entry1 = close < open

float a = na
float b = na
float c = na

if( entry1 and is_test_datetime and strategy.position_size==0 )
a := high
b := a + tr * 3
c := a - tr * 3
strategy.entry( "Entry1" ,strategy.long ,1 ,stop=a )
strategy.exit( "Exit1" ,"Entry1" ,stop=c ,limit=b )
=====
Yorum:
次の講座

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

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

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

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.