The talib.LN()
function is used to calculate the Vector Log Natural (natural logarithm).
The return value of the talib.LN()
function is a one-dimensional array.
array
talib.LN(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, 2, 3]
var ret = talib.LN(data)
Log(ret)
}
import talib
import numpy as np
def main():
data = [1.0, 2.0, 3.0]
ret = talib.LN(np.array(data))
Log(ret)
void main() {
std::vector<double> data = {1, 2, 3};
auto ret = talib.LN(data);
Log(ret);
}
The LN()
function is described in the talib library documentation as: LN(Records[Close]) = Array(outReal)