|
buhold:=TBUYHOLDINGEX(ac,'',2); sehold:=TSELLHOLDINGEX(ac,'',2); if BUHOLD>0 and holding>0 then tsell(1,min(holding*xs,BUHOLD),lmt,pc-tkf+dw,0,ac); if SEHOLD>0 and holding<0 then tsellshort(1,min(-holding*xs,SEHOLD),lmt,pc+tkf-dw,0,ac); |
看着也没问题,交易日志有运行完毕的字样吗?
如果都有的话只能通过debughfile去进行调试输出了,看是哪个条件没满足
我用msgout输出窗口,都能看到正常的输出多单或空单字样,挂平仓集合竞价的条件应该是满足了:
buhold:=TBUYHOLDINGEX(ac,'',2);
sehold:=TSELLHOLDINGEX(ac,'',2);
//MSGOUT(BUHOLD>0 and holding>0,'多单'+NUMTOSTR(BUHOLD,0));
//MSGOUT(SEHOLD>0 and holding<0,'空单'+NUMTOSTR(SEHOLD,0));
if holding>0 and BUHOLD>0 then tsell(1,holding,lmt,c-tkf+dw,0,ac,''),ALLOWREPEAT;
if holding<0 and SEHOLD>0 then tsellshort(1,-holding,lmt,c+tkf-dw,0,ac,''),ALLOWREPEAT;
那看日志里面怎么记录的,有报单触发动作没
交易-下单设置-程式化交易-记录下单日志
把这边勾上