RoundUp ( double number, int numberOfDigits);

Default values:

numberOfDigits: 2


Rounds a number up to a certain number of digits.

Input parameters

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


input price = close;
input digits = 0;
plot ceiling = RoundUp(price, digits);
plot floor = RoundDown(price, digits);

This example plots bands representing a price of the instrument rounded up and down to a certain number of digits.