if islastbar and tholding=0 then extgbdataset('原多开仓',0);
if islastbar and extgbdata('原多开仓')=0 and tholding>0 then begin
debugfile2('c:\111.txt','开原始多单,开仓价格约为:%.2f'+',当前持仓量:'
+ltrim(numtostr(abs(tholding),0)), close ,1);
extgbdataset('原多开仓',close);
end
目的:记录第一次开仓点位
为什么if islastbar and extgbdata('原多开仓')=0 and tholding>0永远成立呀,全局变量值老是变
监控全局变量,一直变化,在0和CLOSE两个数之间变