math.sqrt
Take the square root of a series, for example to turn a variance into a deviation.
math.sqrt(x)Square root. na for negative arguments.
Parameters
A series parameter takes a value on every bar. A constant parameter must be known before the first bar, such as a number or an input.
| Name | Kind | Type | Default | Range | Description |
|---|---|---|---|---|---|
x | Series | number | - | - | The value to transform. |
Output
| Name | Type |
|---|---|
value | number |
Warm-up and missing values
- Warm-up
- None.
- Missing values
- na in, na out. A result outside the finite range is a calculation error.
Example
math.sqrt(close)plot(math.sqrt(ta.variance(close, 20)), "Deviation 20")