Floor Function

Author: Optuma Team Last updated: Apr 15, 2019 23:42

The FLOOR() function can be used to round a value down to the nearest integer. For example, to round down the 22 day standard deviation of the close:

FLOOR(STD(CLOSE(), BARS=22))

This is how it compares without the Floor function. Values above 2 are rounded down to 2, above 1 rounded down to 1, and below 1 is zero:

Floor Function Example