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.
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.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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
Where 1 is only the symbols in Market Watch.
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.
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.
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.
Generic StringEnum() can be found here.
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?