trim decimal places

 

I'm using NormalizeDouble() in metatrader to round to the 5th decimal place. The problem is that it keeps all the zeroes at the end, for example: 1.34567000000

How can I trim the number to 5 decimal places, getting rid of the zeroes?

 

NormalizeDouble should work. DoubleToStr(number, digits) is also useful for removing zeroes when printing.