yuya_takahashi_

Pine講座53 バックテストでエントリーも指値注文

Éducation
FX:USDJPY   Dollar Américain / Yen japonais
昨日の続きですが、
もちろんエントリーも指値(逆指値)で入ることができます。

・ブレイクアウト系
・逆張り系
・価格の明確な利益確定
・明確なロスカット

このあたりは、
ちゃんと指値注文を使ってあげると
少しだけ幸せになれるかもしれません。

※ 解説はコードの中で

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

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

entry1 = time[1] < timestamp(2019,9,5,6,00) and time >= timestamp(2019,9,5,6,00)
diff = time - time[1]

float entry_price = na
float exit_limit = na
float exit_stop = na

if( entry1 )
 entry_price := high
 exit_limit := entry_price + tr * 3
 exit_stop := entry_price - tr * 3
 line.new( time ,entry_price ,time+diff*30 ,entry_price ,xloc=xloc.bar_time ,color=color.red )
 line.new( time ,exit_limit ,time+diff*30 ,exit_limit ,xloc=xloc.bar_time ,color=color.red )
 line.new( time ,exit_stop ,time+diff*30 ,exit_stop ,xloc=xloc.bar_time ,color=color.red )
 strategy.entry( "Entry1" ,strategy.long ,1 ,stop=entry_price )
 strategy.exit( "Exit1" ,"Entry1" ,stop=exit_stop ,limit=exit_limit )
=====

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

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

小次郎講師のチャート情報局
bit.ly/2GvLAEp
Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.