conditional

RTL Conditional Operator

The RTL Language has a special operator for conditional evaluation. The operator is designed to allow formulas where one result is desired in some cases and another result in other cases. For example, suppose you want to write a custom indicator formula where the value of the custom indicator is the maximum close in 5 periods for bars that close higher than they opened, but for bars that close at or below their open, the value is to be the minimum close in 5 periods. This kind of conditional formula can be cleverly written as: