Re: tradestation的寫作方式 - 財經

By Andy
at 2006-06-24T09:59
at 2006-06-24T09:59
Table of Contents
附上程式,我想要的程式是開盤如果比昨天收盤跳高大漲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;
--
例如,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;
--
Tags:
財經
All Comments
Related Posts
出場後不想馬上進場

By Caitlin
at 2006-06-20T16:04
at 2006-06-20T16:04
Tradestation和Metaserver取DDE資料的問題

By Zanna
at 2006-06-18T23:26
at 2006-06-18T23:26
Re: 給那些抱股的散戶

By Candice
at 2006-06-17T23:58
at 2006-06-17T23:58
Tradestation和Metaserver取DDE資料的問題

By Christine
at 2006-06-17T20:21
at 2006-06-17T20:21
新手的程式交易績效 Part 2

By Bennie
at 2006-06-13T23:19
at 2006-06-13T23:19