Guest User | Sign In

Knowledge Base

Rounding Function

Overview


Only available from Optuma v1.4

The Round() function in scripting allows you to directly control the decimal places a script value outputs and works with.  In the following example you can see two Show View indicators overlaid on top of each other.



Both are using an identical script, except one (yellow) has the Round() function applied, limiting the script values to 2 decimal places.  You can see the effect it has with larger movements between each value, and smoother tops as the values are rounded up / down compared to the green plot.

The Round() function can be applied to any script that produces a numerical value.

Example

V1 = CLOSE() / OPEN() ;
ROUND(V1, DECIMALTYPE=0.00)

 Last updated Tue, Apr 2 2019 8:23pm

Please Wait!

Please wait... it will take a second!