Docs

math.atan

Take the arc tangent of a value, as an angle in radians.

itm
math.atan(x)

Arc tangent in radians, in (-pi/2, pi/2). One argument cannot tell the second quadrant from the fourth. math.atan2 can.

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.atan(close)
itm
plot(math.atan(ta.ret(close, 1)), "Arc tangent")