Digits() is only for current symbol (chart symbol).
MODE_DIGITS is to be used with MarketInfo(), it can be used to find the value for any symbol.
SYMBOL_DIGITS is to be used with SymbolInfoInteger(), it's the same usage as MarketInfo() but comes from mql5 for compatibility reason.
Digits() is only for current symbol (chart symbol).
MODE_DIGITS is to be used with MarketInfo(), it can be used to find the value for any symbol.
SYMBOL_DIGITS is to be used with SymbolInfoInteger(), it's the same usage as MarketInfo() but comes from mql5 for compatibility reason.
Thanks for your assistance once again Alain. I really appreciate help from experienced coders because even though the MQL Book is very helpful, it's still quite hard to understand if you don't come from a programming background.
mark
Thanks for your assistance once again Alain. I really appreciate help from experienced coders because even though the MQL Book is very helpful, it's still quite hard to understand if you don't come from a programming background.
mark
Hi MQL4/5,
As you will see from the nature of my question, I am new to coding and am currently stuck on how and where to use 3 different versions of the 'Digits'. That being "Digits", "MODE_DIGITS" and "SYMBOL_DIGITS".
How are each of these used?
I have a section of my program that checks the decimal place accuracy of the pair and I have used the predefined variable Digits
if (Digits==5)
{Pair=10000;}
else
{Pair=100;}
But I would like to know in what instances I would have used the other two variations of this.
One more thing - How do I attach a section of my program to a post.
Mark

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi MQL4/5,
As you will see from the nature of my question, I am new to coding and am currently stuck on how and where to use 3 different versions of the 'Digits'. That being "Digits", "MODE_DIGITS" and "SYMBOL_DIGITS".
How are each of these used?
I have a section of my program that checks the decimal place accuracy of the pair and I have used the predefined variable Digits
if (Digits==5)
{Pair=10000;}
else
{Pair=100;}
But I would like to know in what instances I would have used the other two variations of this.
One more thing - How do I attach a section of my program to a post.
Mark