Docs

math.pow

Raise one series to the power of another.

itm
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.

NameKindTypeDefaultRangeDescription
aSeriesnumber--First value.
bSeriesnumber--Second value.

Output

NameType
valuenumber

Warm-up and missing values

Warm-up
None.
Missing values
na in either argument gives na.

Example

itm
math.pow(close, 2)
itm
plot(math.pow(ta.ret(close), 2), "Squared return")