Skip to content
Algo Trade Analytics Docs

math.abs() - Pine Script Function

Absolute value of number is number if number >= 0, or -number otherwise.

math.abs(number) → const int
NameTypeDescription
numberconst intThe number to use in the calculation.

The absolute value of number.