|
NormalizeDoubleRounding floating point number to a specified accuracy.
Parameters value [in] Value with a floating point. digits [in] Accuracy format, number of digits after point (0-8). Return Value Value of double type with preset accuracy. Note Calculated values of StopLoss, TakeProfit, and values of open prices for pending orders must be normalized with the accuracy, the value of which can be obtained by Digits(). Please note that when output to Journal using the Print() function, a normalized number may contain a greater number of decimal places than you expect. For example, for:
you will have the following in the terminal:
Example:
See also DoubleToString, Real types (double, float), Reduction of types, |