Vector Trigonometric Tanh
TANH calculates the hyperbolic tangent of a value.
Method
Section titled “Method”tm.ta.tanh(source)Inputs
Section titled “Inputs”| Parameter | Argument type | Description | Default Value |
|---|---|---|---|
| source | pd.Series | Input data series | - |
Outputs
Section titled “Outputs”| Output | Type |
|---|---|
| tanh | 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 Trigonometric Tanh tanh = tm.ta.tanh(data.close)
# Get the last value and print last_value = tanh.iloc[-1] tm.log(f"Last value of Vector Trigonometric Tanh is {last_value}")
# Plot the values of tanh tm.plot(tanh, title="Vector Trigonometric Tanh", overlay=False)