2009年5月6日 星期三

當遇開盤漲跌停時,TS策略要馬上反向下單之程式寫法

Vars:TopValue(0),DownValue(0);

IF Marketposition = -1 and time=1345 then begin

TopValue = (Floor((close * 1.07)/10))*10;

buy ("FXS") next bar at TopValue stop;

End;

IF Marketposition = 1 and time=1345 then begin

DownValue = (Ceiling((close * 0.93)/10))*10;

sell ("FXL") next bar at DownValue stop;

End;

沒有留言:

張貼留言