Lipi Reference Lipi

Operators

!

Not equal to. Applicable to expressions of any type.

Syntax

                !expr0 | not expr0
              

Example


          indicator("Logical NOT Example", overlay=true)
// Condition: Close is above the previous close
abovePrevClose = close > close[1]
// Use `!` to invert the condition
bgcolor(!abovePrevClose ? color.red : color.green)