Re: tradestation的寫作方式

看板Trading (金融交易)作者 (故事)時間19年前 (2006/06/24 09:50), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/4 (看更多)
附上程式,我想要的程式是開盤如果比昨天收盤跳高大漲100點以上 例如,6/16開盤就進場做多(雖然當天其實不適合做多) (如果開低再爬上去不算) 馬上出現買進訊號,同時,系統回測時也會計錄在當根k棒的open點 而不是close,更不是next bar的open 請各位先進指導一下吧 ~>_<~ input: Price(close),loss(26); if open>close[1] +100 then begin buy("買") this bar at open stop; {上面這一行沒辦法在ts執行,不過hts可以執行只要加上or higher or lower} end; if open - low > 30 and currentcontracts>0 then begin exitlong ("BUY出場")this bar at close; end; if low < value7 - loss and currentcontracts>0 then begin exitlong ("BUY停")this bar at close; end; -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.62.241.66
文章代碼(AID): #14d9fn02 (Trading)
文章代碼(AID): #14d9fn02 (Trading)