- www.mql5.com
I really looked everywhere but I can’t sort it out.
Could you tell me why a code like this one
is giving “Array out of range” error?
All my researches bring me to “Dynamic Array Object” on MQL5 references, which doesn’t seem to explain the situation to me.
The problem is probably on declaring the array.
Please if you can’t bother to answer to this novice, just send me a link !!!
Thanks a lot in advance
Maybe try this:
int Array[1][15][15];
Array[1][1][1]=256;
Print(Array[1][1][1]);
Maybe try this:
int Array[1][15][15];
Array[1][1][1]=256;
Print(Array[1][1][1]);
“How to declare dynamic arrays”
Thank you ToolMaker, but actually here the title is
“How to declare dynamic arrays”
maybe.
int Array[1][15][15];
Array[0][1][1]=256;
Print(Array[0][1][1]) ;
Is that better?
but I thought this array is static...
- www.mql5.com
This is a slight change of subject -
I know arrays can't act as input variables however I want to know if there is a way to store them externally. At the moment I have an array that is written to in the OnCalculate section, but I can't see how to save the results from tick to tick.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I really looked everywhere but I can’t sort it out.
Could you tell me why a code like this one
is giving “Array out of range” error?
All my researches bring me to “Dynamic Array Object” on MQL5 references, which doesn’t seem to explain the situation to me.
The problem is probably on declaring the array.
Please if you can’t bother to answer to this novice, just send me a link !!!
Thanks a lot in advance