Skip to content

Vector Trigonometric Cosh

COSH calculates the hyperbolic cosine of a value.

Method

tm.ta.cosh(source)

Inputs

ParameterArgument typeDescriptionDefault Value
sourcepd.SeriesInput data series-

Outputs

OutputType
coshnp.ndarray

Example usage

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