The talib.TANH()
function is used to calculate the Vector Trigonometric Tanh (hyperbolic tangent function).
The return value of the talib.TANH()
function is: a one-dimensional array.
array
talib.TANH(inReal)
The inReal
parameter is used to specify the K-line data.
inReal
true
{@struct/Record Record} structure arrays, numeric arrays
function main() {
var data = [-1, 0, 1]
var ret = talib.TANH(data)
Log(ret)
}
import talib
import numpy as np
def main():
data = [-1.0, 0, 1.0]
ret = talib.TANH(np.array(data))
Log(ret)
void main() {
std::vector<double> data = {-1, 0, 1};
auto ret = talib.TANH(data);
Log(ret);
}
The TANH()
function is described in the talib library documentation as: TANH(Records[Close]) = Array(outReal)