At first function MathCeil() doesn't change argument value (argument is passing by value). To get result is returned by MathCeil() you should use statement like this:
tmp=MathCeil(tmp);
(please read help topic https://www.mql5.com/en/docs/math/mathceil)
Finally why don't you use function NormalizeDouble()?
Documentation on MQL5: Math Functions / MathCeil
- www.mql5.com
Math Functions / MathCeil - Documentation on MQL5
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
Hi folks,
I'm implementing a function to calculate volume to trade according to a fix percentage of potential loss in comparison to total equity.
My problem is that im getting invalid volume since it have a lot of digits. I already tried using Mathround and mathceil/floor and it keep with a lot of digits.
After function has passed:
Any ideas?
thanks in advance ! :)