Lipi Reference
Lipi

Functions

math.atan()

The arctangent of `angle`, in radians. It is defined for every number.

Syntax · 1 of 4

                math.atan(const float angle) → const float
              

Arguments

angle required const float The value, in radians, to use in the calculation.

Return Type

const float

Syntax · 2 of 4

                math.atan(input float angle) → input float
              

Arguments

angle required input float The value, in radians, to use in the calculation.

Return Type

input float

Syntax · 3 of 4

                math.atan(simple float angle) → simple float
              

Arguments

angle required simple float The value, in radians, to use in the calculation.

Return Type

simple float

Syntax · 4 of 4

                math.atan(series float angle) → series float
              

Arguments

angle required series float The value, in radians, to use in the calculation.

Return Type

series float

Example


          //@lipi=2
indicator("math.atan Example", overlay=false)
// Slope of a 10-bar change, as an angle
slopeAngle = math.todegrees(math.atan((close - close[10]) / 10))
plot(slopeAngle, title="Slope Angle", color=color.blue)