Selection dropdown?
-
Is there a way to make a selection menu where I can pick different settings within an EA?
Where do I make this part in FxDreema and is there a way to show a name for the selction, but use a setting hidden for the user? Something like EASY, MEDIUM and HARD and if they pick one of these, the code will use 10, 50 or 90 for the setting (not shown for the user). -
If you want to put such thing on the chart, I'm not sure that MT4/MT5 can do that, at least I can't find something like this in their list of objects: http://docs.mql4.com/constants/objectco ... num_object
If you define "Constants", they will be also input parameters of the EA. In the builder, let's say under "on Init", depending on the value of the Constants you can modify some Variables. Variables and Constants are both global variables, but Variables are hidden from the outside world.
-
Well, it's the constants that I want to be selected. I wonder if it's possible to put three different numbers there, where the user can select.
I think I've seen that before in an EA. When I go to the properties window in MT4 I get a dropdown to select an option. I guess that is something I should add in the constants here? But how? -
Like the image added where I can select true or false.
-
For these to show up, the data type of the Constant must be... let's say special. There is a big list of what they call "Enumerations", here is just onbe of them as example: https://www.mql5.com/en/docs/constants/ ... t_position So, the data type here is this one ENUM_CHART_POSITION and if you use this as a data type for a Constant, it should create a dropdown list with 3 options in it.
Also, custom Enumerations can be created, but even I am not using this functionality in the code of fxDreema. Here is more: https://www.mql5.com/en/docs/basis/type ... numeration