-- 作者:lanchongms
-- 发布时间:2013/2/4 18:46:26
--
找出来了
后台代码:
cc:=round(EXTGBDATA(STKLABEL));//乘以每个模型的下单系数,相加得到最后的理论持仓
buyhold:=tbuyholdingex(ac,stklabel,1); sellhold:=tsellholdingex(ac,stklabel,1);
b1:=dynainfo(20); b1v:=dynainfo(25); s1:=dynainfo(21); s1v:=dynainfo(31);
ztb:=DYNAINFO(54); dtb:=DYNAINFO(55);
wtb:=tremainqty(1,ac,stklabel); wtbp:=tremainqty(2,ac,stklabel); wts:=tremainqty(3,ac,stklabel); wtsp:=tremainqty(4,ac,stklabel); wt:=wtb+wtbp+wts+wtsp;
debugfile(road,\'bf ms=\'&numtostr(makesure,0)&\' wt=\'&numtostr(wt,0)&\' ab=\'&numtostr(abbb,0)&\' abp=\'&numtostr(abbbp,0)&\' as=\'&numtostr(abbs,0)&\' asp=\'&numtostr(abbsp,0)&\' acd=\'&numtostr(abbcd,0)&\' cc=\'&numtostr(cc,0)&\' lx=\'&numtostr(leixing,0)&\' gg=\'&NUMTOSTR(gg2,0)&\' p1=\'&NUMTOSTR(price,2)&\' b1=\'&NUMTOSTR(b1,2)&\' b1v=\'&NUMTOSTR(b1v,0)&\' s1=\'&NUMTOSTR(s1,2)&\' s1v=\'&NUMTOSTR(s1v,0)&\' bh=\'&numtostr(buyhold,0)&\' sh=%.0f\',sellhold);
一段下单代码
debugfile(road,\'af ms=\'&numtostr(makesure,0)&\' wt=\'&numtostr(wt,0)&\' ab=\'&numtostr(abbb,0)&\' abp=\'&numtostr(abbbp,0)&\' as=\'&numtostr(abbs,0)&\' asp=\'&numtostr(abbsp,0)&\' acd=\'&numtostr(abbcd,0)&\' cc=\'&numtostr(cc,0)&\' lx=\'&numtostr(leixing,0)&\' gg=\'&NUMTOSTR(gg2,0)&\' p1=\'&NUMTOSTR(price,2)&\' b1=\'&NUMTOSTR(b1,2)&\' b1v=\'&NUMTOSTR(b1v,0)&\' s1=\'&NUMTOSTR(s1,2)&\' s1v=\'&NUMTOSTR(s1v,0)&\' bh=\'&numtostr(buyhold,0)&\' sh=%.0f\',sellhold); 后台结束
TXT记录
2013-02-04 14:54:58.453 bf ms=517191 wt=0 ab=0 abp=0 as=0 asp=0 acd=0 cc=-5 lx=1 gg=0 p1=5446.00 b1=5451.00 b1v=206 s1=5452.00 s1v=275 bh=0 sh=5 2013-02-04 14:54:58.453 af ms=517192 wt=0 ab=0 abp=0 as=0 asp=0 acd=0 cc=-5 lx=1 gg=0 p1=5446.00 b1=5451.00 b1v=206 s1=5452.00 s1v=275 bh=0 sh=5 2013-02-04 14:54:58.484 bf ms=517192 wt=0 ab=0 abp=0 as=0 asp=0 acd=0 cc=0 lx=1 gg=0 p1=5446.00 b1=5451.00 b1v=188 s1=5452.00 s1v=274 bh=0 sh=5 2013-02-04 14:54:58.484 af ms=517193 wt=0 ab=0 abp=0 as=0 asp=5 acd=0 cc=0 lx=1 gg=2 p1=5451.00 b1=5451.00 b1v=188 s1=5452.00 s1v=274 bh=0 sh=5 2013-02-04 14:54:58.531 bf ms=517193 wt=5 ab=0 abp=0 as=0 asp=5 acd=0 cc=0 lx=1 gg=2 p1=5451.00 b1=5451.00 b1v=188 s1=5452.00 s1v=274 bh=0 sh=0 2013-02-04 14:54:58.531 af ms=517194 wt=5 ab=0 abp=0 as=0 asp=0 acd=0 cc=0 lx=1 gg=0 p1=5451.00 b1=5451.00 b1v=188 s1=5452.00 s1v=274 bh=0 sh=0 2013-02-04 14:54:58.594 bf ms=517194 wt=5 ab=0 abp=0 as=0 asp=0 acd=0 cc=0 lx=1 gg=0 p1=5451.00 b1=5451.00 b1v=188 s1=5452.00 s1v=274 bh=0 sh=5 2013-02-04 14:54:58.594 af ms=517195 wt=5 ab=0 abp=0 as=0 asp=0 acd=5 cc=0 lx=1 gg=2 p1=5451.00 b1=5451.00 b1v=188 s1=5452.00 s1v=274 bh=0 sh=5
PLEACEORDER记录
2013-02-04 14:54:58.547 【下单】SRY09 价5451.000000 量5 买卖0 类型0 开平2 账户8703000168 Formula 1 2013-02-04 14:54:58.547 【下单】确认报单已发送 ID=107549618 RefID = 34 2013-02-04 14:54:58.547 【后台】RU05 运行结束 2013-02-04 14:54:58.547 【后台】SRY09 运行结束
2013-02-04 14:54:58.594 【后台】CU05 运行结束 2013-02-04 14:54:58.594 【后台】RU05 运行结束 2013-02-04 14:54:58.594 【后台】SRY09 TCANCELEX 出现信号 类型:0 帐号:8703000168 [这里本来不应该撤单,红色部分,代码检测到WT+SH大于系统仓CC(实际这时候sh应该为0才对),作出撤单动作]
2013-02-04 14:54:58.641 【指令】收到回报指令 ID = 107549617 RefID = 33 2013-02-04 14:54:58.656 【指令】收到回报指令 ID = 107549618 RefID = 34 2013-02-04 14:54:58.656 【指令】收到回报指令 ID = 107549619 RefID = 35 2013-02-04 14:54:58.719 【指令】收到回报指令 ID = 107549617 RefID = 33 2013-02-04 14:54:58.719 【指令】收到回报指令 ID = 107549618 RefID = 34
2013-02-04 14:54:58.719 【回报】8703000168 : SR309 - 已报单 5 价格:5451 平 买
|