enum ENUM_TRADE_MODE{ AGGRESSIVE_MODE, // Chuck Norris MODERATE_MODE, // Gentle Gentleman SAFE_MODE}; // Fluffy Puppy
WHRoeder:
No way... it's so simple...
Just a small adjustment because the last element not works on your code...
enum ENUM_TRADE_MODE{ AGGRESSIVE_MODE, // Chuck Norris MODERATE_MODE, // Gentle Gentleman SAFE_MODE // Fluffy Puppy };
Thans man... this was great!... i will never think in use comments!
Blast from the past here, sorry!
May I ask any of the mql developers why for the hell this feature is not documented e.g. into https://docs.mql4.com/basis/types/integer/enumeration?
This would be quite useful and can save some time to people... (reference manuals should do, right?).
Thank you so much in ada

Enumerations - Integer Types - Data Types - Language Basics - MQL4 Reference
- docs.mql4.com
Enumerations - Integer Types - Data Types - Language Basics - MQL4 Reference

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Olá,
How can i do to add friendly labels for enum options?
See my code below, i used 2 external parameters with enum: AppliedPrice and TradeMode. The first uses a language native enum (ENUM_APLIED_PRICE) e the second uses an enum that i created myself (ENUM_TRADE_MODE).
Now, take a look at the 2 elements on the image below. The ENUM_APLIED_PRICE( AppliedPrice) do not shows its declared enum options(PRICE_CLOSE, PRICE_OPEN, etc) but "friendly" text labels instead. But my custom enum (ENUM_TRADE_MODE) shows its optins (AGGRESSIVE_MODE, MODERATE_MODE, SAFE_MODE):
How can i do to show friendly texts just like native enums? I've tried some options but not works: