Apparently this is another 'zero divide' issue. See https://forum.mql4.com/21364
close[i]/Close[i+1] should draw in subwindow, since the value maybe not in range of Axes of main wondw
DxdCn:
close[i]/Close[i+1] should draw in subwindow, since the value maybe not in range of Axes of main wondw
close[i]/Close[i+1] should draw in subwindow, since the value maybe not in range of Axes of main wondw
Thanks every my mentors!! I solved the problem for you. thanks a lot
Replace
Buffer[i]=close[i]/Close[i+1];
to
Buffer[i]=Close[i]/Close[i+1];

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi everyone I want to ask a question.
I tried to make percent increase or percent decrease indicator.
So I made code like that
int limit=Bars-IndicatorCounted();
for(int i=limit-i;i>0;i--)
{
Buffer[i]=close[i]/Close[i+1];
}
but that was never work.
I changed above code / to - like that
Buffer[i]=close[i]-Close[i+1];
I notice that is work and I checked
Comment(Close[0]/Close[1])
is working correctly
so I can't understand why Buffer[i]=close[i]/Close[i+1]; was not working.
could anybody please suggest how to code? thanks a lot