How many options are there in mq4 for rounding off figures...

[Deleted]  

Hi

I was wondering if anyone can tell what options are available for rounding a figure?

For example I know the normalizedouble code and thats about it.

Thanks

Antony

[Deleted]  
What else would you want?
 

to round to 20ths, (handy for some strange lot sizing that goes up in 0.05 increments)

try

double lotsUpIn20ths = MathAbs(exactLots * 20 + 19) / 20;

double lotsNearestIn20ths = MathAbs(exactLots * 20 + 10) / 20;

double lotsDownIn20ths = MathAbs(exactLots * 20) / 20;

NB code just typed; not compiled or checked

[Deleted]  
tonyjms2005:

Hi

I was wondering if anyone can tell what options are available for rounding a figure?

For example I know the normalizedouble code and thats about it.

Thanks

Antony


MathRound

MathFloor

MathCeil