以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://www.weistock.com/bbs/index.asp)
--  金字塔软件问题提交  (http://www.weistock.com/bbs/list.asp?boardid=2)
----  全局变量  (http://www.weistock.com/bbs/dispbbs.asp?boardid=2&id=9009)

--  作者:hebeihk
--  发布时间:2011/11/17 13:29:32
--  全局变量

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两个数之间变


--  作者:fly
--  发布时间:2011/11/17 15:22:26
--  

您的全局变量问题,求的是开仓时的价格,下面这个帖子跟您的问题类似.

请您关注该帖进展http://www.weistock.com/bbs/dispbbs.asp?boardid=4&Id=9011