these enum data identifiers are NOT recognized in mql4, even though they are documented in the MQL4 Reference
ENUM_ACCOUNT_STOPOUT_MODE, ENUM_ACCOUNT_TRADE_MODE, ENUM_APPLIED_VOLUME, ENUM_DRAW_TYPE, ENUM_SYMBOL_TRADE_EXECUTION, ENUM_SYMBOL_TRADE_MODE, ENUM_TRADE_RETURN_CODES
for example if I compile a script with this line
Print("MQL_PROGRAM_TYPE = "+MQLInfoInteger(MQL_PROGRAM_TYPE)+" = "+EnumToString((ENUM_PROGRAM_TYPE)MQLInfoInteger(MQL_PROGRAM_TYPE)));
it's all correct and Script prints: MQL_PROGRAM_TYPE = 1 = PROGRAM_SCRIPT
but, if i try to compile this other line
Print("SYMBOL_TRADE_MODE = "+SymbolInfoInteger(Symbol(), SYMBOL_TRADE_MODE)+" = "+EnumToString((ENUM_SYMBOL_TRADE_MODE)SymbolInfoInteger(Symbol(), SYMBOL_TRADE_MODE)));
there are errors! 'NUM_SYMBOL_TRADE_MODE' - undeclared identifier
and so on with 'ENUM_SYMBOL_TRADE_EXECUTION' - undeclared identifier, 'ENUM_ACCOUNT_TRADE_MODE' - undeclared identifier, ..., ...
Help me this not working
<code removed>
- www.metaquotes.net
Help me this not working
<code removed>
Hi, with the new version I am unable to compile my code, receiving the message "expression of 'void' type is illegal" with reference to line 1 column 1 (see attached pictures). The line 1 and column 1 as shown on other attached pict. Any idea what I have to look for?
Thanks for help

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article Common Errors in MQL4 Programs and How to Avoid Them has been published:
Author: MetaQuotes Software Corp.