Problem with arrays out of range
Whatever position has for a value, you are subtracting i from it, this will and must lead to a value below NULL... That's why you are out of range.
EDIT: the debugger would have shown you...
Dominik Egert:
yep, thats it. thank you very much
Whatever position has for a value, you are subtracting i from it, this will and must lead to a value below NULL... That's why you are out of range.
EDIT: the debugger would have shown you...
For the beginners it's very common problem. If you understand it's very easy to solve. Suppose an array size is 10 i.e. array[10] that it's index start from 0 to 9. Somehow inside code if there something happened that index become less than 0 or more than 9 then this array out of range happen.
Hello guys, I'm new with MQL5 and I am trying to create a indicator which calculates the standard deviation from a vector of new calculated prices of the diference between close and opening from each candle.
I have successfully created the moving average with no problem but when I use MA values to calculate the STD there is no error running the code, but there is a error of array out of range in the expert tab.
can anyone just point what is wrong with my code?