v8: Revised 'stage' values and improve signals.
+1 oversold and rising
+2 rising above lower boundary
+3 rising above mid
+4 overbought
-1 overbought and falling
-2 falling above mid
-3 falling below upper boundary
-4 oversold
Updated:
stochRSI(smoothK, smoothD, rsiLen, stochLen, src, kmode, upper, lower) Returns a signal value representing the stage of where the RSI is in its cycle.
Parameters:
smoothK: The length to average the stochastic.
smoothD: The length to smooth out K and produce D.
rsiLen: The length of the RSI.
stochLen: The length of stochastic.
src: The series to measure from. Default is 'close'.
kmode: The type of moving average to generate. Values allowed are: SMA, EMA, WMA, VWMA and VAWMA.
upper: The upper band of the range.
lower: The lower band of the range.
Returns: [signal, stage] Where stage is: +1 is oversold and rising, +2 rising above lower bound but less than mid. +3 rising above mid. +4 is overbought. Negative numbers are the reverse.