double array[];
⋮
array[ i ] = i;
Your array has no size. Why does trying to assign to it (giving you your error) surprise you?
BobChip #:
It is not possible to create a dynamic array on MQL5?
Like C++, either you resize the array with ArrayResize to the amount you need, or use a container like CArrayDouble that automatically allocates the memory as you need.
It is not possible to create a dynamic array on MQL5?
BobChip #: It is not possible to create a dynamic array on MQL5?
Perhaps you should read the manual. ArrayResize - Array Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
How To Ask Questions The Smart Way. (2004)
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello , i have created a simple program on MQL5 but i keep getting array out of range.
Could you tell me how i can fix it please?