Trend Indicator
Definition: Determines whether the current value is above, below, or within a range defined by the zero limit parameter (usually 0). The resulting values are +1, -1, or 0, respectively.
Syntax:
ternary(zeroLimit)
Arguments:
zeroLimit
- bounds of values that will producer output of 0Return: Time series of ternary values
Description: Output is +scale if input > zeroLimit -scale if input < -zeroLimit 0 if -zeroLimit <= input <= zeroLimit
Example:
ternaryValue = BTC.close -> rsi(30) -> ternary(10)
Last modified 29d ago