Easy way to make ENUM
-
When searching the forum for ENUM declaration, some threads mention additional custom indicators or custom blocks. There is a simplier way too:
- Make enum-type constant, put its values to curly brackets separated by comma.
- Use that enum to create an input: Type must be the Name of 1st constant, Value must be some of the values inside the brackets.
This method doesnt seem to allow for Descriptions, though...


-
@roar Thank you very much for sharing, as always.
-
@roar How can I create a condition using these drop down menu options?
Would it be "Text" or " Text code input" in the condition block? -
"Code input" or "Numeric" should work.
Enumerations can be in used as their name or as integers according to their place in the list

-
Great, work here with numeric https://fxdreema.com/shared/Msfdavdbe
-
@roar I tested it here and it worked perfectly.
Thanks for this valuable tip. -
I think this method was already posted somewhere, I just can't find the thread anymore to give the credit they deserve.
-
-
I will add this, make sure enum is on top, before adding the named type, so the code as added to meta platform before it tries to use.
-
This is pretty epic thank you
-
great, so i dont need to edit on metaeditor anymore
-
I don't know if it's Fxdreema, but I had a problem with my projects that had these functions, stay tuned.
-
Hey Roar ! Thank you so much ! You are amazing !
-
@roar
loop Thanks n times -
-
@Paihdt you can do the condition like this:

-
About the inputs of the EA, is anyone here familiar with the groups feature ?
on the MQL5 documentation, it is mentioned an input type called group, to make the user inputs panel more organized... https://www.mql5.com/en/docs/basis/variables/inputvariables -
@QuantEngineer
It seems just for display a line of text without any actual function. Good for visual only. -
@sktsec there is a function, clicking on the "folder" will hide a section of the inputs list. I haven't got it working on fxdreema, though
-
Exactly !
It is good to match the interior beauty with some exterior beauty when possible!

