Switch Operator
Expression of the switch operator must be of integer type.Switch Operator - Operators - Language Basics - MQL4 Reference Expression of the switch operator must be of integer type — int or uint.
Language Basics / Operators / Switch Operator - Reference on algorithmic/automated trading language for MetaTrader 5
whroeder1:
or enum
aslkdjf:
or enum
or enum
and datetime, color, bool, etc...
Strictly speaking the documentation is imprecise, it should be of "integer types", as switch statement can use any integer types.

Integer Types - Data Types - Language Basics - MQL4 Reference
- docs.mql4.com
In MQL4 integers are represented by eleven types. Some types can be used together with other ones, if required by the program logic, but in this case it's necessary to remember the rules of typecasting.

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
switch (MarketInfo(Symbol(), MODE_MINLOT)) {
illegal expression