if tholding2=0 and TREMAINQTY(1,'','')=0 and TREMAINQTY(3,'','')=0 then extgbdataset('orderdone',0);
if extgbdata('orderdone')=0 and (TREMAINQTY(1,'','')>0 or TREMAINQTY(3,'','')>0) and tholding2=0 then extgbdataset('orderdone',1);
if abs(tholding2)>0 and not(extgbdata('orderdone')=3) then extgbdataset('orderdone',2);
debugout('开多=%.0f',TREMAINQTY(1,'',''));
debugout('开空=%.0f',TREMAINQTY(3,'',''));
debugout('orderdone=%.0f',extgbdata('orderdone'));
if Islastbar then DEBUGFILE2('D:\nTGAn.TXT',' 开多:'&numtostr(TREMAINQTY(1,'',''),0)&' 开空:'&numtostr(TREMAINQTY(3,'',''),0)&' orderdorderdone'),1);
这可是对应你们的例子来搞的
1.使用的有全局变量extgbdata---请改为序列模式
2.考虑用DEBUGFILE,这个函数要注意两个地方的大小写,请严格按照下面红色标识的大小写来写
DEBUGFILE('D:\HLPYIF.TXT','IF外IFPKKD=%.0f',IFPKKD);
谢谢,果然就是这个文件名必须得大写,晕大,请在下版帮助文件中修正啊,真害人