Error: array out of range
Hi everyone, I was testing this new indicator in the strategy tester and the error: array out of range (56.22) came out. If anyone can help me out, thanks.
- Please "array out of range"
- Array out of range error
- Error --- Array out of range ???
You are accessing array elements from 0 to NumLevels+1, that makes NumLevels+2 items. So you either need to run your for variable from 0 to NumLevels-1, or resize the arrays larger.
Either:
ArrayResize(MyLevelsUpArray,NumLevels+2);
or:
for(int conta=0; conta<=NumLevels-1; conta++)
lippmaje:
Thanks very much
You are accessing array elements from 0 to NumLevels+1, that makes NumLevels+2 items. So you either need to run your for variable from 0 to NumLevels-1, or resize the arrays larger.