Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
talib.SQRT
Calculates the square root of each element (Vector Square Root).
talib.SQRT(inReal)Examples
Compute the square root of a few numbers.
javascript
function main() {
var data = [4, 64, 100]
var ret = talib.SQRT(data)
// Output: [2, 8, 10]
Log(ret)
}
python
import talib
import numpy as np
def main():
data = [4.0, 64.0, 100.0]
ret = talib.SQRT(np.array(data))
# Output: [2, 8, 10]
Log(ret)Returns
| Type | Description |
numeric array | Results, the same length as the input. |
Arguments
| Name | Type | Required | Description |
inReal |
| Yes | K-line array (close prices are used) or numeric array; in Python, pass a numeric array such as |
See Also
Remarks
TA-Lib equivalent: SQRT(Records[Close]) = Array(outReal).