作者harold1018 ( )
看板Trading
標題[問題] 關於停損信號的問題(HTS)
時間Sun Aug 7 20:00:21 2011
Variables: orderprice1(0)
Orderprice1=entryprice(0)*0.985
Condition1 = MA(close,5) cross over MA(close,10)
if Condition1 then buy this bar at market
end if
if marketposition=1 and BARSSINCEENTRY(0)>0 and BARSSINCEENTRY(0)<11 Then
Exitlong this bar at orderprice1 stop
end if
if marketposition=1 and BARSSINCEENTRY(0)=10 Then
Exitlong this bar at market
end if
這樣寫停損信號 我發現一個大問題
就是他只會平倉在K線的實體 而不會停損在影線耶!!!
也就是明明當日最低已經低於我設定的停損點
只要該K棒收在停損點之上 就不會執行停損!!! (我希望一碰到停損點立刻就平倉)
請教要怎麼辦才能讓停損執行在影線上(或者是我的寫法有問題?)
感謝!!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.26.75.136
1F:→ sen16888:可以的話HTS盡量不要用this bar進出,google一下就知道了 08/08 00:35
2F:推 ChouYii:登登登 08/08 00:38