runmode:1;
input:lots(1,1,10,1);
賬戶:='';
品種1:='SRX05';
品種2:='SRX09';
p_m:=1;
品種1最新價(jià):=dynainfo2(7,品種1);
品種2最新價(jià):=dynainfo2(7,品種2);
n:=2;
if 品種2最新價(jià)-品種1最新價(jià)<>0 and extgbdata('n1')=0 and TBuyHoldingEx('賬戶','SRX05',0)=0 AND TSellHoldingEx('賬戶','SRX09',0)=0 then begin
tbuy(1,lots,lmt,品種1最新價(jià),0,賬戶,品種1);
tbuyshort(1,lots,lmt,品種2最新價(jià),0,賬戶,品種2);
aa:=品種2最新價(jià)-品種1最新價(jià);
extgbdataset('SRX基礎(chǔ)價(jià)差',aa);
extgbdataset('n1',1);
end
if 品種2最新價(jià)-品種1最新價(jià)>=extgbdata('SRX基礎(chǔ)價(jià)差')+n*p_m and extgbdata('n2')=0 and TBuyHoldingEx('賬戶','SRX05',0)=1 AND TSellHoldingEx('賬戶','SRX09',0)=1 then begin
tbuy(1,lots,lmt,品種1最新價(jià),0,賬戶,品種1);
tbuyshort(1,lots,lmt,品種2最新價(jià),0,賬戶,品種2);
extgbdataset('n2',1);
end
第二次為什么不能進(jìn)場(chǎng)
就是第二段下單不執(zhí)行?
給你的條件辦法,你照里面的辦法把所有的條件全都輸出一遍,看看是哪個(gè)條件不滿足
http://www.weistock.com/bbs/dispbbs.asp?BoardID=4&ID=1246&replyID=&skin=1