Camza:
Subtract half of MODE_LOTSTEP before Normalizing . . . it's just simple mathematics.
Hello,
My problem is that I want to calculate lot size depending on the account balance like that:
But I wouldn't like to round the figure to the higher value so if my AccountBalance() is for example 10360 it's:
10360 * 0.001 = 10.36 lot size, after rounding it's 10.4
I don't want to have my numbers rounded, maybe there is some function to just leave only first number after dot?
So the lot size would be 10.3 not 10.4
If you know the solution please help me up, I will gladly appreciate it.
Thanks.
Camza:
10360 * 0.001 = 10.36 lot size, after rounding it's 10.4
I don't want to have my numbers rounded#define TENTH 0.1 Lots=MathFloor(Lots2 / TENTH)* TENTH;
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,
My problem is that I want to calculate lot size depending on the account balance like that:
But I wouldn't like to round the figure to the higher value so if my AccountBalance() is for example 10360 it's:
10360 * 0.001 = 10.36 lot size, after rounding it's 10.4
I don't want to have my numbers rounded, maybe there is some function to just leave only first number after dot?
So the lot size would be 10.3 not 10.4
If you know the solution please help me up, I will gladly appreciate it.
Thanks.