<condition1> or <condition2>
<value1> is <greater/less> than
or equal to <value2>
1. This reserved word is used to define complex conditions. For a complex condition to be true it is required that at least one condition from it is true.
2. This reserved word is also used in phrases of human-readable syntax for two comparison operators: "is greater than or equal to" and "is less than or equal to". See the is reserved word article for details.
input NumberOfBars = 3;
def barsUp = if close > close then barsUp + 1 else 0;
def barsDown = if close < close then barsDown + 1 else 0;
plot ConsecutiveBars = barsUp >= NumberOfBars or barsDown >= NumberOfBars;
This example highlights bars having the closing price lower than the closing price of the specified number of previous bars with a dot.