Skip to main content

tanh


TANH

Type: tanh • Category: indicators

Description

Vector Trigonometric Tanh

Parameters

NameTypeDescriptionRequiredDefault
dataExpstringInput datano

Help

TANH

Vector Trigonometric Tanh

Description

The TANH worker is an indicator used in financial markets to calculate the hyperbolic tangent of input data. This worker is particularly useful in technical analysis for generating signals or transforming data.

What does this worker do?

The TANH worker applies the hyperbolic tangent function to the input data. The hyperbolic tangent function, tanh, is a mathematical function that returns values between -1 and 1, which can be useful for normalizing data or generating indicators that oscillate around zero.

How to interpret the results

The output of the TANH worker will be a value between -1 and 1 for each input data point. Values close to 1 indicate that the input data is large and positive, values close to -1 indicate that the input data is large and negative, and values close to 0 indicate that the input data is close to zero. This transformation can help in identifying trends or patterns in the data.

Parameters

The TANH worker accepts the following parameters:

dataExp

  • Type: string
  • Description: Input data. This should be a string representing the data on which the tanh function will be applied.

Example Usage

To use the TANH worker, you would provide a string of data points. For example, if you have an array of numbers representing stock prices or trading volumes, you would convert this array into a string and pass it as the dataExp parameter.

{
"dataExp": "[1, 2, 3, 4, 5]"
}

The TANH worker would then return an array of tanh values corresponding to each input data point.

Notes

  • Ensure that the input data is a string and properly formatted for the worker to process.
  • The worker assumes that the input data can be converted into a format that allows for the calculation of the tanh function.