math.pow
Raise one series to the power of another.
math.pow(a, b)a raised to the power b.
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 |
|---|---|---|---|---|---|
a | Series | number | - | - | First value. |
b | Series | number | - | - | Second value. |
Output
| Name | Type |
|---|---|
value | number |
Warm-up and missing values
- Warm-up
- None.
- Missing values
- na in either argument gives na.
Example
math.pow(close, 2)plot(math.pow(ta.ret(close), 2), "Squared return")