Array out of range for Value Zone
int limit=prev_calculated-1; if(prev_calculated==0) {…} for(int i=limit; i<rates_total; i++){ BuyZoneBuffer[i]=EMPTY_VALUE;First run, prev_calculated is zero, limit is minus one, i is minus one, array[-1] does not exist.
How to do your lookbacks correctly #9 — #14 & #19
There are 6 indicator buffers declared, but in fact you have 8 arrays:
#property indicator_buffers 6 *** double MAFastBuffer[], MAFastBufferC[]; double MASlowBuffer[], MASlowBufferC[]; double MASlowBufferHigh[],MASlowBufferLow[]; double BuyZoneBuffer[],SellZoneBuffer[];
Hi William, Vladimir,
Apologies for the oversight.
Managed to get it right by adding the additional 2 buffer.
Thanks for the enlightenment.
Regards,
JD
Hi,
I'm having an issue with the Array out of range for line (226,36).
The indicator handles are set the same with only the difference of PRICE_HIGH and PRICE_LOW.
Can someone point me to where the error is?
Thank you.
Regards,
JK