Need help trying to cut off the digits after the 2 digits after the decimal point.
The original result is 0.01526
I used this code:
double mxlots1 = NormalizeDouble((actfrmargin1*Leverage),2)
The result is 0.02 because NormalizeDouble rounded it off to the nearest 2 digits.
I need this to result in 0.01 because I don't have enough money in my account to do 0.02 lots.
Is there another function that will just cut off after the first 2 digits after the decimal point, without rounding it off to 0.02?
Is there another function
that will just cut off after the first 2 digits after the decimal point, without rounding it off to 0.02?
How about this?
double mxlots1 = MathFloor(actfrmargin1*Leverage*100)/100
Yes it works great now.
Success to all!!
Most pairs are worth about $10 per PIP. A $5 risk with a (very small) 5 PIP
SL is $5/$10/5 or 0.1 Lots maximum.
I have been trading for 13 years and blown 6 margin calls, so I have learned my lessons and I know what I'm doing. But thanks for your input.
Success to all!