hi,
I wanted to kindly ask you if anyone knows if that is possible: maybe with some external code dll or Winapi stuff.
I mainly come from a hobby 'python' background which was slightly different so I'm not sure if my question sounds kind of silly
1.Question:
I read the MT4 doc (http://docs.mql4.com/basis/variables) and to my understanding of the doc it's not possible - but maybe there are some external workaround?
e.g.
2. Question:
In case it is possible: how do I best access them from other functions.
I was also thinking maybe to use a array to assign the different variables to: but I guess it would not work for the double dBuf[];
Something along this lines:
e.g.
I wanted to kindly ask you if anyone knows if that is possible: maybe with some external code dll or Winapi stuff.
I mainly come from a hobby 'python' background which was slightly different so I'm not sure if my question sounds kind of silly
1.Question:
I read the MT4 doc (http://docs.mql4.com/basis/variables) and to my understanding of the doc it's not possible - but maybe there are some external workaround?
e.g.
Inserted Code
int _i = 0;
while (_i < 2) {
//CREATE: variables on the fly appending _i at the end of the variable name.
int iAnything(_i) = 10;
string sAnything(_i) = "Black";
double dBuf(_i)[];
}
//Should produce
#_1 = 0
int iAnything0 = 10;
string sAnything0 = "Black";
double dBuf0[];
#_1 = 1
int iAnything1 = 10;
string sAnything1 = "Black";
double dBuf1[];
#_1 = 2
int iAnything2 = 10;
string sAnything2 = "Black";
double dBuf2[]; In case it is possible: how do I best access them from other functions.
I was also thinking maybe to use a array to assign the different variables to: but I guess it would not work for the double dBuf[];
Something along this lines:
e.g.
Inserted Code
int iVariabesOnTheFly[];
string sVariabesOnTheFly[];
int _i = 0;
while (_i < 2) {
//CREATE: variables on the fly simulate using Arrays
ArrayResize[iVariabesOnTheFly,_i + 1);
ArrayResize[sVariabesOnTheFly,_i + 1);
iVariabesOnTheFly[_i] = 10;
sVariabesOnTheFly[_i] = "Black";
[color=Blue]//double dBuf(_i)[]; But for Arrays I don't know[/color]
} __Thanks__ MJ