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棒收在停損點之上 就不會執行停損!!! (我希望一碰到停損點立刻就平倉)
請教要怎麼辦才能讓停損執行在影線上(或者是我的寫法有問題?)
感謝!!!
--
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棒收在停損點之上 就不會執行停損!!! (我希望一碰到停損點立刻就平倉)
請教要怎麼辦才能讓停損執行在影線上(或者是我的寫法有問題?)
感謝!!!
--
All Comments