void roundArray(double &arr[], int digits) { for (int i=ArraySize(arr)-1; i>=0; i--) arr[i] = NormalizeDouble(arr[i], digits); }
Does this even compile?
SMAArray[]=MathRound (SMAArray[], _Digits);
nicholi shen:
Thank you.
I was thinking if there was another option without using a for.
Maybe is the only option, I will use that way for now.

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
Hey,
I want to Round the number of an Array of my indicator. I need to Round the numbers to the number of digits of the currency, for example the EURUSD in my broker has 5 digits, while USDJPY have 3 digits.
I cannot do it this way. And I want to change Round the numbers as soon as they are created, that way when I call them later they will be ready.
I doing this as in the reference manual, don't know why is not working.
https://www.mql5.com/en/docs/standardlibrary/mathematics/stat/mathsubfunctions/statmathround
Thank you!