RoundUp

RoundUp ( int numberOfDigits );

Default values:

numberOfDigits: 2

Description

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.

Example

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.