Zero divide error
fftremblay:
I got an zero divide error from this indicator. I tried to fix the problem without success.
Can anyone told me what's wrong in the code ?
for(int i = 0 ;i <= limit-20 ;i++)
{
chakin[i] = ((emahl[i]-emahl[i+iPeriod])/emahl[i+iPeriod] ) *100;
}
Apparently i + iPeriod exceeds emahl array boundary. The elements of array outside its boundaries are equal to 0 in mql4.
Hi all,
When I'm trying to use the following indicator in an EA via the following code
double Chaikin = iCustom(NULL, 0, "Chaikins Volatility_Kalenzo", iChaikinPeriod, iChaikinMaPeriod, iChaikinBarsToCount,0, 1);
I got an zero divide error from this indicator. I tried to fix the problem without success.
Can anyone told me what's wrong in the code ?
Thanks