Skip to content
Algo Trade Analytics Docs

math.pow() - Pine Script Function

Mathematical power function.

math.pow(base, exponent) → const float
NameTypeDescription
baseconst int/floatSpecify the base to use.

base raised to the power of exponent. If base is a series, it is calculated elementwise.

//@version=6
indicator("math.pow", overlay=true)
plot(math.pow(close, 2))