The talib.SQRT()
function is used to calculate the Vector Square Root (square root).
The return value of the talib.SQRT()
function is: a one-dimensional array.
array
talib.SQRT(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 = [4, 64, 100]
var ret = talib.SQRT(data)
Log(ret)
}
import talib
import numpy as np
def main():
data = [4.0, 64.0, 100.0]
ret = talib.SQRT(np.array(data))
Log(ret)
void main() {
std::vector<double> data = {4, 64, 100};
auto ret = talib.SQRT(data);
Log(ret);
}
The SQRT()
function is described in the talib library documentation as: SQRT(Records[Close]) = Array(outReal)