all I got is that one can create a list which will be assigned values from 0 with increments of 1s but thats it... The next topic/chapter in the help is about the double/float variable, so not sure if i'm missing something or more about enum will come up in later help topics.
What do you mean there are no examples? There are two examples on that page and enumerations are used in many MQL functions, so there is even more examples all over.
Besides, we live in the world of the internet where there are many websites out there that explain what enumerations are in C and C++ just as the documentation mentions.
EDIT: Here is another example in the documentation on how it is used ... https://www.mql5.com/en/docs/basis/variables/inputvariables
In the example, an enumerations for the types of moving averages is explained ...
input ENUM_MA_METHOD MA_Method=MODE_SMMA; // Method
ID
Description
MODE_SMA
Simple averaging
MODE_EMA
Exponential averaging
MODE_SMMA
Smoothed averaging
MODE_LWMA
Linear-weighted averaging
- www.mql5.com
@Fernando Carreiro Yes there are 2 examples but they're limited to how to create an enum list not how to use it.
Now i figured out you can create a new variable of the enum type of get the index pointer of the value assigned to it from the list.
Also your links show it can be used for drop down list so thank you for that
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hi guys,
i'm going through the help doc of mql5 and am reading about enum here https://www.mql5.com/en/docs/basis/types/integer/enumeration
however there's no examples of how they're used.
all I got is that one can create a list which will be assigned values from 0 with increments of 1s but thats it...
The next topic/chapter in the help is about the double/float variable, so not sure if i'm missing something or more about enum will come up in later help topics.
tnks in adv
L