ConnorsRSI — Connors RSI
תוכן זה אינו זמין עדיין בשפה שלך.
Three components averaged: a very short RSI of price, an RSI of the up/down streak length, and the percent rank of the latest return. Each measures a different kind of stretch, and the average is a short-term mean-reversion oscillator that reads 0–100.
Signature
ConnorsRSI(rsi_period, streak_period, rank_period, on=<source>)| Argument | Type | Required | Notes |
|---|---|---|---|
rsi_period |
int Param or literal | Yes | RSI of price. Default 3, bounds 1–100. |
streak_period |
int Param or literal | Yes | RSI of the streak counter. Default 2, bounds 1–100. |
rank_period |
int Param or literal | Yes | Window for the return percent rank. Default 100, bounds 2–400. |
on= |
symbol, OHLCV field, or indicator | No | Source. Defaults to the trade symbol’s close. |
Formula
$$ \text{CRSI} = \frac{\text{RSI}(C, 3) + \text{RSI}(\text{streak}, 2) + \text{PercentRank}(\text{return}, 100)}{3} $$
The streak counter is +n after n consecutive up closes, −n after n down closes, 0 on an unchanged close.
Warmup
rank_period + 1 bars for the rank component; the two RSIs seed within a few bars. 50 until
started.
Reading the value
crsi.valuecrsi < 10crsi.crossed_above(50)Example
class ConnorsFade(Strategy): """Connors' own use: buy deep oversold in an uptrend, exit at the midline.""" trade = Symbol() sizing = FixedCapital()
def execute(self): crsi = ConnorsRSI(3, 2, 100, on=self.trade) trend = SMA(200, on=self.trade) if crsi.value < 10 and self.trade.close > trend.value and self.trade.is_flat: self.buy(self.trade, reason=f"CRSI {crsi.value:.0f}") if crsi.value > 50 and self.trade.is_long: self.sell(self.trade, self.trade.position, reason="CRSI recovered")Notes
- Larry Connors and Cesar Alvarez, Connors RSI (2012).
- Proven by an assert-via-trade run on SPY daily (stayed inside 0–100 on every bar of a 140-bar run, with all three components contributing; zero alarm trades).
- Both internal RSIs seed with a cumulative average rather than Wilder’s first-
naverage — the difference decays within a few bars at these very short periods.