Download MetaTrader 5
To add comments, please log in or register
Have you published a program in the Market? Place it in your blog as well - the widget will help!
Paul Watson
18
Paul Watson 2010.10.16 02:06 

Can enumeration be used in MQL4? I'd like to have input parameters where an input is Moving Average Method and the user has a choice of Simple, Exponential, etc instead of having to input 0, 1, etc. Is that possible?


Thanks,

Paul

Nikolay Panev
1072
Nikolay Panev 2010.10.16 12:00  
pwwatson:

Can enumeration be used in MQL4? I'd like to have input parameters where an input is Moving Average Method and the user has a choice of Simple, Exponential, etc instead of having to input 0, 1, etc. Is that possible?


Thanks,

Paul

Unfortunately not possible.
sergery
281
sergery 2010.10.16 13:22  
// you may use the below codes as a note
extern string MaMethod="Ma_Method's Number Value";
extern string SMA="0";
extern string EMA="1";
extern string SSMA="2";
extern string LWMA="3";
bernd
985
bernd 2010.10.16 14:07  
pwwatson:

Can enumeration be used in MQL4? I'd like to have input parameters where an input is Moving Average Method and the user has a choice of Simple, Exponential, etc instead of having to input 0, 1, etc. Is that possible?

Will be possible in MT5
sergery
281
sergery 2010.10.16 15:23  
7bit:
Will be possible in MT5

YES.
whroeder1
14457
whroeder1 2010.10.16 21:48  
extern int MA.Mode.S0E1L3 = 0;
gbulle
127
gbulle 2014.07.19 16:47  

Now possible using MT4 - Build 600:

enum enum_side
{
    BUY=1,
    SELL=-1
   
};


....

...

input  enum_side side=1;


GB

/
To add comments, please log in or register