Re: tradestation的寫作方式

看板Trading (金融交易)作者 (阿樂 - 反省再出發)時間19年前 (2006/06/25 22:14), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/4 (看更多)
※ 引述《ioikor (故事)》之銘言: : 附上程式,我想要的程式是開盤如果比昨天收盤跳高大漲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; 在TS可以用 input : price(close),loss(26); if open of tomorrow > close + 100 then buy next at market; -- 霧谷晨曦照映晨,滄松一線凌青雲,傲看天下紅塵,睥睨太虛乾坤 清泉飛揚飄緲入艷陽,宇文微步瀟灑行江湖,持無極,斬荊棘 乃至無苦,無欲...... -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.229.22.247
文章代碼(AID): #14dff5zx (Trading)
討論串 (同標題文章)
本文引述了以下文章的的內容:
以下文章回應了本文
完整討論串 (本文為第 3 之 4 篇):
文章代碼(AID): #14dff5zx (Trading)