Double variables defined with a string name?

 

I want to create a string name e.g.

string name = A+B 

and then define a double variable with that string name e.g.

double name = x+y

Is that at all possible?

 
it will say already declared...
 
ernest02:

I want to create a string name e.g.

and then define a double variable with that string name e.g.

Is that at all possible?

No it's not possible with mql4.
 
ernest02:

I want to create a string name e.g.

and then define a double variable with that string name e.g.

Is that at all possible?


A work around:

1) Define a struct with value(s) and variable name(s).

2) Define an array of these structs.

3) If you need a specific var.-name search in the array for the name and get its value(s)

Gooly

 

@ OP

I was thinking. Why making yourself hard when you can use other var names? Code smart not code hard.



 

Thanks for the help and advice guys - especially that of Gooly.

Ernest

 
ernest02:

Thanks for the help and advice guys - especially that of Gooly.

Ernest


You are welcome - good luck and lots of pips ;)

Gooly

Reason: