Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共7 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:为什么这段代码在仿真账户执行没有问题,实盘就会死机或不执行撤单

1楼
jinze 发表于:2016/5/27 12:00:52
if not(cicang_dtprice = sprice) then
begin
//tcancelex(1 ,2 ,'8880888' ,cicang);
writeinifile('c:\8880888.ini',stkname(),stklabel&'-chedan',0);
repeat
begin
chedan:=getinifile('c:\8880888.ini',stkname(),stklabel&'-chedan');
if chedan = 0 then
begin
tcancelex(1 ,2 ,'8880888' ,cicang);
writeinifile('c:\8880888.ini',stkname(),stklabel&'-chedan',1);
end
chedangcon:=tremainqty( 2,'8880888' ,cicang);
end
until chedangcon = 0;
//sleep(100);
tsell(1,how,lmt,sprice,0,'8880888',cicang),allowrepeat;
//debugfile('c:\133one.txt','how01 %.2f  ',how);
debugfile('c:\133one.txt','cicang_dtprice %.2f  ',cicang_dtprice);
debugfile('c:\133one.txt','sprice %.2f  ',sprice);
debugfile('c:\133one.txt','how01 %.2f  ',how);
debugfile('c:\133one.txt','cc800988 %.2f  ',0000000000000);
end
2楼
jinzhe 发表于:2016/5/27 13:25:20

有调试日志吗?

这段代码要实现什么目的?

3楼
jinze 发表于:2016/5/27 14:29:38
目的就是撤单后从新下单
4楼
jinzhe 发表于:2016/5/27 14:32:31

把下单日志和调试文件发一下

还有死机指的是电脑没反映了,还是金字塔没反映了?

5楼
jinze 发表于:2016/5/27 14:38:43
死机是金字塔下单模块占用了100%系统资源。实盘没记日志,调试文件也看不出问题。
6楼
jinzhe 发表于:2016/5/27 14:45:33

chedan:=getinifile('c:\8880888.ini',stkname(),stklabel&'-chedan');

在这句话后面调试输出chedan

 

 

chedangcon:=tremainqty( 2,'8880888' ,cicang);

在这句话后面调试输出chedancon

 

需要分析撤单的条件以及调出循环条件的成立情况

7楼
jinze 发表于:2016/5/27 14:47:40
好,下周测试
共7 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.03906 s, 3 queries.