RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
kd:=K>D and c>o ;//开多平空条件
pd:=c<o;
kk:=k<d and c<o;//开空平多条件
pk:=c>o;
if TISREMAIN(3)<>0 AND kd then
BEGIN
tcancel(1,0),ORDERQUEUE;
END
if TISREMAIN(1)<>0 AND kk then
BEGIN
tcancel(1,0),ORDERQUEUE;
END
if TISREMAIN(1)<>0 AND pd and tholding2<>0 and tholding=0 then
BEGIN
tcancel(1,0),ORDERQUEUE;
END
if TISREMAIN(3)<>0 AND pk and tholding2<>0 and tholding=0 then
BEGIN
tcancel(1,0),ORDERQUEUE;
END
if PK then BEGIN
tsellshort( tholding<0,0,lmt,DYNAINFO(28)),ORDERQUEUE;
END
if KD and TISREMAIN(0)=0 then BEGIN
tbuy( tholding=0,1,lmt,c-30*MINDIFF),ORDERQUEUE;
END
IF pd then begin
tsell( tholding>0 ,0,lmt,DYNAINFO(34)),ORDERQUEUE;
END
IF KK and TISREMAIN(0)=0 then begin
tbuyshort (tholding=0,1,lmt,c+30*MINDIFF),ORDERQUEUE;
end
http://www.weistock.com/bbs/dispbbs.asp?boardid=2&Id=73952
楼上
1,这个你要学习下vba的一些知识哦
OrderStatusEx2 用这个事件跟踪下报单ID的返回情况,就可以实现实际需求的下单队列,以及追撤单