MQL5 Question: unable to initialise a 2 dimensional array using existing array variables
It is simply not the way you can deal with array in MQL5.
For what you want you should use matrices and vectors. See here https://www.mql5.com/en/docs/matrix
and study the examples there.
Documentation on MQL5: Matrix and Vector Methods
- www.mql5.com
A matrix is a two-dimensional array of double, float, or complex numbers. A vector is a one-dimensional array of double, float, or complex numbers...
Varun Maithani:
Below is the code (for Script) i am trying to compile but i get error. I am not sure why i cant get this syntax to work.
Error is shown below:
You can initialize N-dimensional arrays directly:
double dd[3][5] = { {1,2,3,4,5}, {6,7,8,9,10}, {11,12,13,14,15} };
Hi
Below is the code (for Script) i am trying to compile but i get error. I am not sure why i cant get this syntax to work.
Error is shown below: