ENUM_DAY_OF_WEEK fri = FRIDAY; // fri = 5 ENUM_DAY_OF_WEEK sat = SATURDAY; // sat = 6 int i = 0; ENUM_DAY_OF_WEEK x = i; // warning: implicit enum conversion ENUM_DAY_OF_WEEK y = 1; // ok, equals to MONDAY ENUM_ORDER_TYPE buy = ORDER_TYPE_BUY; // buy ...
if(StringFind(EnumToString(e),t) ==-1) { ArrayResize(values,count+1); values[count++] =i; } } returncount; } The concept of its operation is based on the following. Since enumerations in MQL5 are stored as integers of typeint, an implicit casting of any enumeration to(int)is supp...
At this point we will be able to compile the robot's code and even run it - the values of the specified variables will be printed to the terminal journal each second. However, a warning"implicit conversion from 'number' to 'string'"will appearduring compilation: Indeed, in our scheme we...
The concept of its operation is based on the following. Since enumerations in MQL5 are stored as integers of typeint, an implicit casting of any enumeration to(int)is supported, and an explicit castingintback to any enum type is also allowed. In this case, if the value corresponds to one...