Lipi Reference Lipi

Operators

<

Less than. Applicable to numerical expressions.

Syntax

                expr0 < expr1
              

Example


          indicator("Close Below MA", overlay=true)
// Define a 20-period simple moving average
sma20 = talib.sma(close, 20)
// Check if the close price is below the SMA
isBelowMA = close < sma20
// Change background color when the condition is true
bgcolor(isBelowMA ? color.red : na)