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 = SPY.close -> rsi(30) -> ternary(10)
Definition: Unanimous vote among multiple trend lines.
Syntax:
equeum:unanimous_vote(trendlines, zerolimit=0)
Arguments:
trendlines
: list of trend lines to considerzerolimit
: size of neutral zone [-zerolimit, +zerolimit] (default = 0)
Return: A time series of values representing the unanimous agreement among the inputs
Description: For each point in time, 100 if all trend lines are above the neutral zone, -100 if all are below the neutral zone, else 0
Example:
coins = [SPY,MSFT,ORCL].proxy -> rsi(400)
voteVal = equeum:unanimous_vote(trendlines = coins)
Definition: Net vote among multiple trend lines.
Syntax:
equeum:net_vote(trendlines, zerolimit=0)
Arguments:
trendlines
: list of trend lines to considerzerolimit
: size of neutral zone [-zerolimit, +zerolimit] (default = 0)
Return: A time series representing the net vote among the inputs
Description: For each point in time, the vote is the sum for each trend line of 1 if the line is above the neutral zone, -1 if it is below the neutral zone, else 0. The output is normalized to range between -100 (all lines below neutral) to 100 (all lines above neutral).
Example:
coins = [SPY,MSFT,ORCL].proxy -> rsi(400)
voteVal = equeum:net_vote(trendlines = coins)
Definition: Majority vote among multiple trend lines.
Syntax:
equeum:majority_vote(trendlines, zerolimit=0)
Arguments:
trendlines
: list of trend lines to considerzerolimit
: size of neutral zone [-zerolimit, +zerolimit] (default = 0)
Return: A time series of values representing the consensus among the inputs
Description: For each point in time, the output is 100 if a majority of the input trend lines are above the neutral zone, -100 if a majority are below the neutral zone, else 0
Example:
coins = [SPY,MSFT,ORCL].proxy -> rsi(400)
voteVal = equeum:majority_vote(trendlines = coins)
Last modified 4mo ago