StringToEnum - page 3

 
Alain Verleyen:

Ok, thanks, I get your point now. What you would like is to build an ENUM dynamically, which I think is not what the OP want.

There is a lot of improvements on Input parameters which could be useful, hopefully Metaquotes will do them one day.

Yes almost like that the ultimate goal is to have only the available symbols displayed or selectable.

Like the Boolean in

SymbolName(i,1)

Where 1 is only the symbols in Market Watch.

enum symbols
  {
   EURUSD = 1,
   AUDUSD = 2,
   GBPUSD = 3   
  }; 
  
string mysymbol="AUDUSD";

// OP : How to get '2' from string "AUDUSD" ?

I do not have any idea how to compute 2 from "AUDUSD" unless all enums that are in the list are designated to a target so that they can be used in a comparison loop.

 
Marco vd Heijden:

Yes almost like that the ultimate goal is to have only the available symbols displayed or selectable.

Like the Boolean in

Where 1 is only the symbols in Market Watch.

Yes that would be nice

I do not have any idea how to compute 2 from "AUDUSD" unless all enums that are in the list are designated to a target so that they can be used in a comparison loop.

There is a possibility but with some limitations, that's why I asked more information, but it seems it's soooo private.
 
Marco vd Heijden #:

Thanks Enrico

I will try to improve on this.

Here is a image of the expert settings panel to illustrate the problem.


Funny thing is i had to resize it to 50% because it was too large to post to this forum.

hey  Marco vd Heijdenwere you able to solve this problem?

Reason: