Connors RSI — the mean of three unrelated readings of the same bar: how
overbought price is (a short RSI), how stretched the up/down streak is (an
RSI of the streak itself), and where today's one-bar return sits in its own
recent distribution (a percent rank).
Averaging only works if all three have a value, and the percent rank is the
slow one: roc(close, 1) is na on bar 0, and percentrank compares
the current value against the previous lenroc of them, so the first
complete reading is at index lenroc + 1 — 101 on defaults. Running the rank
over the series from bar 1 is what keeps that na out of the window.
Connors RSI — the mean of three unrelated readings of the same bar: how overbought price is (a short RSI), how stretched the up/down streak is (an RSI of the streak itself), and where today's one-bar return sits in its own recent distribution (a percent rank).
Averaging only works if all three have a value, and the percent rank is the slow one:
roc(close, 1)isnaon bar 0, andpercentrankcompares the current value against the previouslenrocof them, so the first complete reading is at indexlenroc + 1— 101 on defaults. Running the rank over the series from bar 1 is what keeps thatnaout of the window.