以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 为什么这段代码在仿真账户执行没有问题,实盘就会死机或不执行撤单 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=97906) |
-- 作者: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
|
-- 作者:jinzhe -- 发布时间:2016/5/27 13:25:20 -- 有调试日志吗? 这段代码要实现什么目的? |
-- 作者:jinze -- 发布时间:2016/5/27 14:29:38 -- 目的就是撤单后从新下单 |
-- 作者:jinzhe -- 发布时间:2016/5/27 14:32:31 -- 把下单日志和调试文件发一下 还有死机指的是电脑没反映了,还是金字塔没反映了? |
-- 作者:jinze -- 发布时间:2016/5/27 14:38:43 -- 死机是金字塔下单模块占用了100%系统资源。实盘没记日志,调试文件也看不出问题。 |
-- 作者:jinzhe -- 发布时间:2016/5/27 14:45:33 -- chedan:=getinifile(\'c:\\8880888.ini\',stkname(),stklabel&\'-chedan\'); 在这句话后面调试输出chedan
chedangcon:=tremainqty( 2,\'8880888\' ,cicang); 在这句话后面调试输出chedancon
需要分析撤单的条件以及调出循环条件的成立情况 |
-- 作者:jinze -- 发布时间:2016/5/27 14:47:40 -- 好,下周测试 |