Docs

math.acos

Take the arc cosine of a value between -1 and 1, as an angle in radians.

itm
math.acos(x)

Arc cosine in radians, in [0, pi]. na outside the domain [-1, 1] rather than NaN.

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
xSeriesnumber--The value to transform.

Output

NameType
valuenumber

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

itm
math.acos(close)
itm
plot(math.acos(ta.cmo(close, 9) / 100), "Arc cosine")