Connors RSI

All functions · nseries package

ConnorsRSI

func (s Series) ConnorsRSI(rsiPeriod, streakRSIPeriod, rocPeriod int) Series

ConnorsRSI computes the Connors RSI composite oscillator. Developed by Larry Connors, it combines three components: a standard RSI, an RSI of the up/down streak length, and a percentile rank of the rate of change. The result is the average of these three values.

The output is on a 0 to 100 scale. The warm-up reads 0, not NaN: bars 0 to F-1 are exactly 0, where F = max(rsiPeriod, streakRSIPeriod+1, rocPeriod+1) is the first valid index: the first bar at which the rate-of-change rank no longer compares with bar 0’s rate of change and the streak RSI’s first window no longer starts at bar 0’s streak, both of which are taken as 0. The component RSIs keep the fading memory of their start that Wilder’s smoothing gives RSI itself. 0 fires Connors’s entries below 5 to 10, so mask bars before F before a threshold rule. Releases before this change gave values from bar rocPeriod, including ranks against bar 0’s rate of change and averages of the component RSIs’ warm-up zeros.

A series shorter than rocPeriod gives zeros. Releases before this change also gave zeros for any series shorter than rsiPeriod+streakRSIPeriod-2 bars, so when that exceeded F a short history did not match the start of a longer one; it now does.