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
According to https://www.mql5.com/en/book/common/conversions/conversions_numbers
long StringToInteger(string text)
The function converts a string to a number of type long. Note that the result type is definitely long, and not int (despite the name) and not ulong.
An alternative way is to typecast using the operator (long). Moreover, any other integer type of your choice can be used for the cast:(int), (uint), (ulong), etc.
The conversion rules are similar to the type double, but exclude the dot character and the exponent from the allowed characters.
Following simple code does not work as documented:
MT5 build 5430 I got following as result:
"Hexadecimal notation" rule does not work for StringToInteger()