nkimt81 發表於 16-7-30 22:48

fu/3rul4HTS觸價單this bar at close?

各位大大 晚安

因為很多前輩說過this bar at close有隱藏著很多的問題, 都建議使用next bar at market
但是如果程式是中進場的點為需要用到觸價單,能使用this bar at close

nkimt81 發表於 16-7-31 12:25

HTS觸價單問題

各位大大 不好意思,昨晚不小心按到送出了,原文如下:

因為很多前輩說過this bar at close有隱藏著很多的問題, 都建議使用next bar at market
但是如果程式是中進場的點為需要用到觸價單,能使用this bar at close or higher嗎?
如果我要的是觸及前一天的某個價位進場,該怎麼表達比較好?
Parameter:Price(Close), slow(100)
ifmarketposition<=0 and close cross over average(close,slow) then
Buy("買進") this bar at close or higher
end If
謝謝!

blj0511 發表於 16-8-1 00:27

this bar的確會有回測上的錯誤問題,不過this bar at close是OK的,不過基本上只要不是當日最後一根K棒,this bar at close=next bar at market

若要觸價買進,可以用buy next bar at xxx stop;
若真的要用this bar就寫成buy this bar at xxx stop; 但會發生回測跟實戰結果不同的問題

盡量還是以next bar來寫,若你寫this bar會比較好,有80%是假象,我寫過用this bar結果勝率100%的程式...............
頁: [1]
查看完整版本: fu/3rul4HTS觸價單this bar at close?