Skip to content
Algo Trade Analytics Docs

math.acos() - Pine Script Function

The acos function returns the arccosine (in radians) of number such that cos(acos(y)) = y for y in range [-1, 1].

math.acos(angle) → const float
NameTypeDescription
angleconst int/floatThe value
inradians
touse in the calculation.

The arc cosine of a value; the returned angle is in the range [0, Pi], or na if y is outside of range [-1, 1].