Syntax
<condition1> or <condition2>
<value1> is <greater/less> than
or equal to <value2>
Description
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.
Example
input NumberOfBars = 3;
def barsUp = if close > close[1] then barsUp[1] + 1 else 0;
def barsDown = if close < close[1] then barsDown[1] + 1 else 0;
plot ConsecutiveBars = barsUp >= NumberOfBars or barsDown >= NumberOfBars;
ConsecutiveBars.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);
This example highlights bars having the closing price lower than the closing price of the specified number of previous bars with a dot.