math.pow() - Pine Script Function
math.pow()
Section titled “math.pow()”Overview
Section titled “Overview”Mathematical power function.
Syntax
Section titled “Syntax”math.pow(base, exponent) → const floatParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| base | const int/float | Specify the base to use. |
Returns
Section titled “Returns”base raised to the power of exponent. If base is a series, it is calculated elementwise.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”//@version=6indicator("math.pow", overlay=true)plot(math.pow(close, 2))