How to use enum
-
If you use the enum parameter? For example, I appear in the parameter options to buy and sell. Similar bool can choose the true and false
......
2@SBCS6FB_373_1(AR{_2YU.png -
I made it manually into code

instead of enum you can use numeric values like 0,1,15,... - depends on how they are used in code -
How to write by hand, give an example of
-
-
first you make your EA in fxdreema with this way:
in constants define one that can be in future changed to your enum, so you define constant:
int MYmode = 0 -
and now you continue in creating blocks - you can with Condition compare logic:
if(MYmode==0)
//if true - orange output pass, if false yellow output pass -
next Condition compare next logic:
if(MYmode==1)
//if true - orange output pass, if false yellow output pass
if(MYmode==2)
...
etc. ...- you generate mq code with fxdreema, after this open your code with MetaEditor and do this:
you write in code your enum structure, need write it in top level - in place where is #property, or functions (not inside functions):
enum ENUM_MY_MODE
{
CCI,
RSI,
Stoch
};- you delete your old constant-input which was defined in fxdreema "int MYmode = 0", - replace this constant-input with type of your enum:
input ENUM_MY_MODE MYmode=CCI;
- compile this with MetaEditor into your working EA and have fun

-