Operators
%
Modulo (integer remainder). Applicable to numerical expressions.
Syntax
expr0 % expr1
Example
indicator("Even or Odd Bars", overlay=true)
// Check if bar index is even or odd
isEvenBar = bar_index % 2 == 0
// Color background based on even or odd
bgcolor(isEvenBar ? color.green : color.red)