The code you have show is insufficient. You do not show the code where or how the array "MinuteBuffer" is declared, nor where its size is set.
In fact, in the above code, various arrays are accessed but their sizes are never verified, and the indexing is simply incremented without regard for their size limits.
MinuteBuffer[index] = EventMinute; <--- array out of range here before 'index' ImpactBuffer[index] = ImpactToNumber(Event[index][IMPACT]);
Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post all relevant code (using Code button) or attach the source file.
How To Ask Questions The Smart Way. (2004)
Be precise and informative about your problem
We have no idea what those two arrays are sized at.
The code you have show is insufficient. You do not show the code where or how the array "MinuteBuffer" is declared, nor where its size is set.
In fact, in the above code, various arrays are accessed but their sizes are never verified, and the indexing is simply incremented without regard for their size limits.
Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post all relevant code (using Code button) or attach the source file.
How To Ask Questions The Smart Way. (2004)
Be precise and informative about your problem
We have no idea what those two arrays are sized at.
The array "MinuteBuffer" is being set as an Indicator buffer, which means that its size is defined by "rates_total" returned by the OnCalculate() event handler.
Unfortunately, there is a design flaw in the code, that does not take this into account and just assumes that there is sufficient elements. It simply processes the XML data and ignores this. That is why it gives the "array out of range" error.
Since, obviously you don't have the coding knowledge to fix this yourself, I suggest you contact the author and have them fix the design logic.
As a workaround, it may be possible to resolve the issue temporarily if you increase the maximum bars allowed for charts, in the terminal's options.
Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
Next time, post in the correct place. The moderators will likely move this thread there soon.
The array "MinuteBuffer" is being set as an Indicator buffer, which means that its size is defined by "rates_total" returned by the OnCalculate() event handler.
Unfortunately, there is a design flaw in the code, that does not take this into account and just assumes that there is sufficient elements. It simply processes the XML data and ignores this. That is why it gives the "array out of range" error.
Since, obviously you don't have the coding knowledge to fix this yourself, I suggest you contact the author and have them fix the design logic.
As a workaround, it may be possible to resolve the issue temporarily if you increase the maximum bars allowed for charts, in the terminal's options.
ouh okay I understand what you are saying. so when the calculation of EventMinute for n number of events (because the loop is infinite while(true) until no more <event> is found and keeps increment the index) exceeds the MinuteBuffer array size (which in this case the rates_total) then the array out of range issue occurs. when you said that the indicator buffer is sized based on the rates_total now it makes sense for the error thanks for the explanation and responses Fernando
is there any way that i could fix it? like declare it as a proper element like array or something? if there is any posting reference of code that i could refer to would be great because i don't know exactly what keyword i should look for right now to fix it.
Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
Next time, post in the correct place. The moderators will likely move this thread there soon.
oh yes initially i actually want to make a post on mq4@mt4 section but couldn't find the link to reach there. after you post the root link now that i know you need to scroll down a bit and there it is mq4@mt4 section. lol. sorry and thanks
The array "MinuteBuffer" is being set as an Indicator buffer, which means that its size is defined by "rates_total" returned by the OnCalculate() event handler.
Unfortunately, there is a design flaw in the code, that does not take this into account and just assumes that there is sufficient elements. It simply processes the XML data and ignores this. That is why it gives the "array out of range" error.
Since, obviously you don't have the coding knowledge to fix this yourself, I suggest you contact the author and have them fix the design logic.
As a workaround, it may be possible to resolve the issue temporarily if you increase the maximum bars allowed for charts, in the terminal's options.
Hey! so yeah thanks for this specific reply of yours Fernando I managed to solve the error once and for all. Thanks a lot Fernando your comments definitely helps ^^
Again thanks a lot Fernando you own my respect on your knowledge and your kind replies.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi.
I stumble upon an indicator to read news from ff and show it on panel. however as I'm testing it, sometimes the indicator gives out array out of range issue on the highlighted line.
Would be glad if anyone could help suggest what line of coding should I add to make it works properly without the array issue. Oh btw the array is declared as double, double MinuteBuffer[],ImpactBuffer[];
Thanks in advance.