Vector Floor
FLOOR rounds each element of the input array to the nearest integer less than or equal to that element.
Method
Section titled “Method”tm.ta.floor(source)Inputs
Section titled “Inputs”| Parameter | Argument type | Description | Default Value |
|---|---|---|---|
| source | pd.Series | Input data series | - |
Outputs
Section titled “Outputs”| Output | Type |
|---|---|
| floor | np.ndarray |
Example usage
Section titled “Example usage”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)