Operators
!
Logical NOT. Applicable to boolean expressions: `!x` is true when `x` is false, and false when `x` is true. It is the symbol spelling of `not`, and the two are the same token to the lexer.
Syntax
!expr0 | not expr0
Example
//@lipi=2
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)