下载MetaTrader 5
要添加评论,请登录注册
您想要编写技术指标吗?在MQL5 参考中找出解决方案!
zbj
145
zbj 2012.05.16 03:17 

在zigzag指标代码中,有这样一段代码,请问,为什么要判断二次 counted_bars==0 ?第一次counted_bars==0 && downloadhistory和第二次counted_bars==0的作用是什么?

if (counted_bars==0 && downloadhistory) // history was downloaded
{

ArrayInitialize(ZigzagBuffer,0.0);
ArrayInitialize(HighMapBuffer,0.0);
ArrayInitialize(LowMapBuffer,0.0);
Print(counted_bars);
}
if (counted_bars==0)
{

limit=Bars-ExtDepth;
downloadhistory=true;
Print(counted_bars);
}

/
要添加评论,请登录注册