Skip to content

Vector Floor

FLOOR rounds each element of the input array to the nearest integer less than or equal to that element.

Method

tm.ta.floor(source)

Inputs

ParameterArgument typeDescriptionDefault Value
sourcepd.SeriesInput data series-

Outputs

OutputType
floornp.ndarray

Example usage

strategy.py
import tradomate as tm
@tm.strategy()
def my_strategy(config: tm.TradomateConfig, data: tm.TradomateData):
# Trying out Vector Floor
floor = tm.ta.floor(data.close)
# Get the last value and print
last_value = floor.iloc[-1]
tm.log(f"Last value of Vector Floor is {last_value}")
# Plot the values of floor
tm.plot(floor, title="Vector Floor", overlay=False)