Hi everybody.
I need create a 2 dimensional double array in MQL4, but with the second dimension variable, in the way:
int Bars2Consider;
double Array2D[100][Bars2Consider];
The fisrt dimension is easy to manage. MQL4 has functions to do that, like ArrayResize, and so on. But the 2nd dimension is not possible to manage inside MQL4.
This way I need to create a .dll in another languaje as C#.
It's not and easy job to me. First, in C# is mandatory to create a Class as envelope. Second, the parameter Array2D must be passed as reference to the external exported function. Then, inside the external function, I should create an intermediate 2-dimensional array with the dimensions passed as parameters, and at last equate their pointers. I have not tested the solution yet, but I am not sure it runs OK.
Anyone has an easier solution, or this is the unique way?
Thanks in advance.
I need create a 2 dimensional double array in MQL4, but with the second dimension variable, in the way:
int Bars2Consider;
double Array2D[100][Bars2Consider];
The fisrt dimension is easy to manage. MQL4 has functions to do that, like ArrayResize, and so on. But the 2nd dimension is not possible to manage inside MQL4.
This way I need to create a .dll in another languaje as C#.
It's not and easy job to me. First, in C# is mandatory to create a Class as envelope. Second, the parameter Array2D must be passed as reference to the external exported function. Then, inside the external function, I should create an intermediate 2-dimensional array with the dimensions passed as parameters, and at last equate their pointers. I have not tested the solution yet, but I am not sure it runs OK.
Anyone has an easier solution, or this is the unique way?
Thanks in advance.