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两个数之间变
您的全局变量问题,求的是开仓时的价格,下面这个帖子跟您的问题类似.
请您关注该帖进展http://www.weistock.com/bbs/dispbbs.asp?boardid=4&Id=9011
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
会一直变化吗
这些是全部代码?
还有其他代码部分吗
或者其他指标也用到了 原多开仓 这个变量?
代码本身除了标准符合和括弧好像不是英文状态输入的。没其他错误