Skip to content

Vector Trigonometric Sin

SIN calculates the sine of a value.

Method

tm.ta.sin(source)

Inputs

ParameterArgument typeDescriptionDefault Value
sourcepd.SeriesInput data series-

Outputs

OutputType
sinnp.ndarray

Example usage

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