以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  如下代码中是否存在未来函数问题??  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=68755)

--  作者:cssfortune
--  发布时间:2014/8/14 15:43:01
--  如下代码中是否存在未来函数问题??

想问一下海龟系统代码中,下面计算的M,N,存在未来函数问题吗?是否要用REF(,1)呢?

 

m:ma(tr,atrcyc),linethick1;

if Barpos>=21 then
BEGIN
   If Barpos=21 then
   N:=M;
   If DayCount=5 or Barpos=21 then
   begin{5天调整N值}
   N:=(19*N+TR)/20;{计算N值}
   DayCount:=0;
   end
   daycount:=daycount+1;
END


--  作者:jinzhe
--  发布时间:2014/8/14 15:55:56
--  
n和datacount初始怎么定义的?
--  作者:cssfortune
--  发布时间:2014/8/15 14:27:55
--  

variable:n=0;

variable:datacount=0;

 

这个会有影响?


--  作者:jinzhe
--  发布时间:2014/8/15 14:29:17
--  
不用加ref,这样可以