Round ( double number, int numberOfDigits);

Default values:

numberOfDigits: 2


Rounds a number to a certain number of digits.

Input parameters

Parameter Default value Description
number - Defines the number to round.
numberOfDigits 2 Defines the number of digits to which the number is rounded.


plot SMA = Round(Average(close, 12) / TickSize(), 0) * TickSize();

This example script plots 12 period SMA rounded to the nearest tick size value.