关于NormalizeDouble函数的问题

 

这个是MT4里关于函数NormalizeDouble的帮助。当digits=1时,即是value保留一位小数。在实际测试的时候,保留的一位小数好像即不是四舍五入得来的,也不是直接把后面的小数位直接舍弃得来的。不知道保留的一位小数具体是怎么得来的。

望各位高手指教。

谢谢。

 
double NormalizeDouble( double value, int digits)
Rounds the floating point value to the given precision. Returns normalized value of the double type.
The calculated StopLoss and TakeProfit values, as well as open price of pending orders must be normalized with a precision the value of which is stored in the pre-defined variable of Digits.


看英文帮助,round,是四舍五入,中文的帮助不要看,翻译的极差。

 

谢谢回复。

现在终于测试明白了,确实是四舍五入。

原因: