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
Unfortunately, unless you post up your code I can't help you.
As you can see from my example above (and the examples in the documentation) it works.
Good luck!
this is my code :
#property strict
extern int Count=4; // Global variable
int OnInit()
{
#define l (Count)
double wInput[l];
for(int cnt=0;cnt<ArrayRange(wInput,0);cnt++){
wInput[cnt]=MathRand();
Alert(wInput[cnt]);
}
return 0;
}
i want to get a number from user then use it to define an array than randomly initialize it.
i want to use multi dimention and using resize is not an option because i cannot define dynamic array more than one dimention.You can't use a variable (Count) to define the constant (l)
i want to use multi dimention and using resize is not an option because i cannot define dynamic array more than one dimention.Yes, you can have a dynamic multi-dimensional array, but only the first dimension can be dynamic e.g.
You can't use a variable (Count) to define the constant (l)
Yes, you can have a dynamic multi-dimensional array, but only the first dimension can be dynamic e.g.
that is the problem i should input two dimensions and then define it!
it is very bad that mql has such restriction !!!!
There are always ways around things.
You can create an array of structures. The structure contains an array.
You can resize the array of structures, and you can resize the array inside the structure.
e.g.
There are always ways around things.
You can create an array of structures. The structure contains an array.
You can resize the array of structures, and you can resize the array inside the structure.
e.g.