Rounding to decimal places

 

Hi Guys

Can anyone tell me how to round to a 2 decimal places, i know how to do it in C++ , but the round function defined in MQL5 takes just one parameter.

 
Syphon:

Hi Guys

Can anyone tell me how to round to a 2 decimal places, i know how to do it in C++ , but the round function defined in MQL5 takes just one parameter.


Probably not what you're looking for : NormalizeDouble, and please read the explanation there. Most of the time NormalizeDouble contain some 999... value after decimal points. If you don't like it and prefer to have 000... value, you should create your own NormalizeDouble function using File Functions.

BTW, see the url - I think you just create topic # 10.000 :)