MT4 IndicatorCounted() 函数和官网ZIGZAG指标 新评论 zbj 2014.08.05 13:14 MT4 ,官网MT4 老的ZIGZAG指标, 有这样一段代码(节选部分代码段), IndicatorCounted() 这个函数放在start()里。我用debug测试,发现一个很奇怪的现象 。第一种情况:如果加了断点1和断点2 , start()第一次运行时,IndicatorCounted() 100%等于0 ,start()第二次运行时, IndicatorCounted()=Bars-1 ,start()第三次及以后运行时,IndicatorCounted()=Bars-1 第二种情况:如果只加断点1,去掉断点2, start()第一次运行时,IndicatorCounted() 100%等于0 ,start()第二次运行时, IndicatorCounted()=0 ,start()第三次及以后运行时,IndicatorCounted()=Bars-1 只改变了断点,又没改程序代码,怎么debug的结果不同int start() {断点1 int i, counted_bars = IndicatorCounted();断点2 int limit,counterZ,whatlookfor; int shift,back,lasthighpos,lastlowpos; double val,res; double curlow,curhigh,lasthigh,lastlow; if (counted_bars==0 && downloadhistory) { ArrayInitialize(ZigzagBuffer,0.0); ArrayInitialize(HighMapBuffer,0.0); ArrayInitialize(LowMapBuffer,0.0); } if (counted_bars==0) { limit=Bars-ExtDepth; downloadhistory=true; } 略。。。。。 问吧! Zigzag指标 自己写的代码~运行不了,求高手帮忙检查一下bug在哪里~ 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
MT4 ,官网MT4 老的ZIGZAG指标, 有这样一段代码(节选部分代码段), IndicatorCounted() 这个函数放在start()里。
我用debug测试,发现一个很奇怪的现象 。
第一种情况:如果加了断点1和断点2 , start()第一次运行时,IndicatorCounted() 100%等于0 ,start()第二次运行时, IndicatorCounted()=Bars-1 ,start()第三次及以后运行时,IndicatorCounted()=Bars-1
第二种情况:如果只加断点1,去掉断点2, start()第一次运行时,IndicatorCounted() 100%等于0 ,start()第二次运行时, IndicatorCounted()=0 ,start()第三次及以后运行时,IndicatorCounted()=Bars-1
只改变了断点,又没改程序代码,怎么debug的结果不同
int start()
{
断点1 int i, counted_bars = IndicatorCounted();
断点2 int limit,counterZ,whatlookfor;
int shift,back,lasthighpos,lastlowpos;
double val,res;
double curlow,curhigh,lasthigh,lastlow;
if (counted_bars==0 && downloadhistory)
{
ArrayInitialize(ZigzagBuffer,0.0);
ArrayInitialize(HighMapBuffer,0.0);
ArrayInitialize(LowMapBuffer,0.0);
}
if (counted_bars==0)
{
limit=Bars-ExtDepth;
downloadhistory=true;
}
略。。。。。