Devbrat Daga:
Hello,
I am still learning MQL4.
I have written this code as part of my EA.
double maxLossDollar = (MathRound(AccountEquity()/100) * 100) * maxLossPerc;
Alert ("maxLossDollar: " + maxLossDollar);
The above code Rounds up to nearest 100 when the balance is between x50.01 to x99.99.
Any guidance to ALWAYS round it down to nearest 100?
So 100.01 to 199.99 is always 100 and so on.
MathMax(MathFloor(AccountEquity() / 100) * 100, 100)

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
Hello,
I am still learning MQL4.
I have written this code as part of my EA.
double maxLossDollar = (MathRound(AccountEquity()/100) * 100) * maxLossPerc;
Alert ("maxLossDollar: " + maxLossDollar);
The above code Rounds up to nearest 100 when the balance is between x50.01 to x99.99.
Any guidance to ALWAYS round it down to nearest 100?
So 100.01 to 199.99 is always 100 and so on.