To obtain the current market information there are several functions: SymbolInfoInteger(), SymbolInfoDouble() and SymbolInfoString(). The first parameter is the symbol name, the values of the second function parameter can be one of the identifiers of ENUM_SYMBOL_INFO_INTEGER, ENUM_SYMBOL_INFO_DOUBLE and ENUM_SYMBOL_INFO_STRING. Some symbols...
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Please how can I get the number of digits after a decimal point.
for example:
int a = 3446.64643231;
how can I get the number of digits after the decimal point which is 8 in this example.
Thanks for the help.
a is an integer.
a= 3446 , so there will be no decimal point and no digits after it.
I don't see that there is any way to get the number of digits for a floating point number. The only way would be if it is input as a string.
Why do you need this? Please show an example of how it would be useful.
Please how can I get the number of digits after a decimal point.
for example:
double a = 3446.64643231;
how can I get the number of digits after the decimal point which is 8 in this example.
Thanks for the help.
Please how can I get the number of digits after a decimal point.
I see that you have deleted your original post and now declare a as a double.
Doesn't make any difference as I cannot see how it can be done reliably.
Please answer my previous question.
Why do you need this? Please show an example of how it would be useful.