估计论坛里没几个人知道zigzag指标里这个问题的答案 新评论 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); } MT4 IndicatorCounted() 函数和官网ZIGZAG指标 自己写的代码~运行不了,求高手帮忙检查一下bug在哪里~ Array out of range exception when debugging 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
在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);
}