All indicators
Momentum / Own pane

Connors RSI

The average of a short RSI, an RSI of the up/down streak length and the percent rank of the last change, on a 0-100 scale.

  • CRSI
  • Built into Spectral
  • Updates every tick
  • connors rsi
  • crsi
  • rsi
  • streak
  • percent rank
  • mean reversion
  • momentum

By Spectral · v1.0.0

MIT-0: free to use, change and share, no attribution needed. What you build from it is yours.

Already in Spectral: add it from the Indicators toolbox. The file here is the same indicator written as a custom indicator, to change or learn from. Installed, it appears next to the built-in one, marked Custom.

Connors RSI on a Spectral chart
Spectral chart with sample market data, default settings.

Overview

Connors RSI (Larry Connors) averages three short-term measures on a 0-100 scale: a 3-bar RSI of price, a 2-bar RSI of the streak (how many closes in a row were up, as a positive count, or down, as a negative count), and the percent rank of the latest one-bar percent change among the previous 100 bars.

How to read it

It is built for short-term mean reversion. High readings mean price rose quickly, for several bars in a row, and by more than usual; low readings the opposite. Connors bought pullbacks in uptrends when it fell below 10 (or 5) and exited when it rose above 90 or 95; TradingView draws 70 and 30.

It turns quickly and spends little time in the middle, so use it to time entries inside a trend you have identified elsewhere, not to define the trend. Show components draws the three parts to see which one drives a reading.

Settings and limitations

Defaults are 3 bars for the RSI, 2 for the streak RSI and 100 for the percent rank, as defined by Connors and used on TradingView. The first value appears on bar Percent rank length + 2 (bar 102 with the defaults). An unchanged close ends a streak (the streak is 0). On a price that does not move at all, all three parts read 100, as on TradingView.

Notes

Matches Connors RSI on TradingView: the percent rank counts the earlier changes that are less than or equal to the latest one. Connors's original description counts only those that are strictly less, which gives slightly lower readings when changes repeat. Both RSIs are Wilder's RSI.

Settings

Each setting appears in the indicator's settings panel in Spectral, next to a color setting for every output.

SettingTypeDefaultRange or optionsWhat it does
RSI lengthWhole number31 – 500Bars in the RSI of price.
Streak RSI lengthWhole number21 – 500Bars in the RSI of the up/down streak.
Percent rank lengthWhole number1001 – 500Earlier bars the latest one-bar percent change is ranked against.
SourcePrice sourcecloseopen, high, low, close, hlc3Price the three parts are calculated from.
Show componentsOn / offOff—Also draw the three parts: the RSI, the streak RSI and the percent rank.
Upper bandNumber700 – 100, step 1Level of the upper reference band; Connors used 90 or 95.
Middle bandNumber500 – 100, step 1Level of the middle reference band.
Lower bandNumber300 – 100, step 1Level of the lower reference band; Connors used 10 or 5.
Fill between bandsOn / offOn—Shade the area between the upper and lower band.

Presets

Each preset is its own entry in the Indicators toolbox, with these settings changed.

Toolbox entryShort nameSettings
Connors RSI (90/10 bands)CRSI 90/10Upper band: 90Lower band: 10

What it draws

Lines

  • CRSIsolid · 1.5 px · primary#B7A1C8
  • RSIdotted · 1 px#8AA9C3
  • Streak RSIdotted · 1 px#C4A46A
  • Percent rankdotted · 1 px#7FB5A0

Levels

  • Upper banddashed · 1 px#788493
  • Middle banddotted · 1 px#788493
  • Lower banddashed · 1 px#788493

Zones

  • Band fillfilled at 10% opacity#B7A1C8

Source

Save it as connors-rsi.js and add it with Indicators → Custom indicators → Add file…. The format is explained in the custom indicators guide.

// Copyright (c) 2026 Spectral
// SPDX-License-Identifier: MIT-0
// Free to use, copy, modify and share: https://spectral.trade/docs/custom-indicators/LICENSE.txt

/** Consecutive up (positive) or down (negative) closes; 0 on an unchanged close and on the first bar. */
function streaks(ta, values) {
  const items = values.map((value, index) => ({ value, previous: index > 0 ? values[index - 1] : null }));
  // The streak carries from bar to bar through ta.scan.
  return ta.scan(items, 0, (streak, { value, previous }, index) => {
    if (index === 0 || value === previous) return 0;
    if (value > previous) return streak > 0 ? streak + 1 : 1;
    return streak < 0 ? streak - 1 : -1;
  });
}

/** @type {import('./spectral-indicator').IndicatorV2} */
export default {
  schemaVersion: 2,
  id: 'connors-rsi',
  name: 'Connors RSI',
  shortName: 'CRSI',
  version: '1.0.0',
  author: 'Spectral',
  description: 'The average of a short RSI, an RSI of the up/down streak length and the percent rank of the last change, on a 0-100 scale.',
  pane: 'oscillator',
  live: { lookback: 'rankLength + 1' },
  inputs: {
    rsiLength: { type: 'integer', label: 'RSI length', default: 3, min: 1, max: 500, description: 'Bars in the RSI of price.' },
    streakLength: { type: 'integer', label: 'Streak RSI length', default: 2, min: 1, max: 500, description: 'Bars in the RSI of the up/down streak.' },
    rankLength: { type: 'integer', label: 'Percent rank length', default: 100, min: 1, max: 500, description: 'Earlier bars the latest one-bar percent change is ranked against.' },
    source: { type: 'source', label: 'Source', default: 'close', description: 'Price the three parts are calculated from.' },
    showComponents: { type: 'boolean', label: 'Show components', default: false, description: 'Also draw the three parts: the RSI, the streak RSI and the percent rank.' },
    upperBand: { type: 'number', label: 'Upper band', default: 70, min: 0, max: 100, step: 1, description: 'Level of the upper reference band; Connors used 90 or 95.' },
    middleBand: { type: 'number', label: 'Middle band', default: 50, min: 0, max: 100, step: 1, description: 'Level of the middle reference band.' },
    lowerBand: { type: 'number', label: 'Lower band', default: 30, min: 0, max: 100, step: 1, description: 'Level of the lower reference band; Connors used 10 or 5.' },
    showFill: { type: 'boolean', label: 'Fill between bands', default: true, description: 'Shade the area between the upper and lower band.' },
  },
  plots: {
    crsi: { label: 'CRSI', color: '#B7A1C8', lineWidth: 1.5, primary: true },
    rsi: { label: 'RSI', color: '#8AA9C3', lineWidth: 1, lineStyle: 'dotted' },
    streakRsi: { label: 'Streak RSI', color: '#C4A46A', lineWidth: 1, lineStyle: 'dotted' },
    rank: { label: 'Percent rank', color: '#7FB5A0', lineWidth: 1, lineStyle: 'dotted' },
  },
  levels: {
    upper: { label: 'Upper band', color: '#788493', lineStyle: 'dashed' },
    middle: { label: 'Middle band', color: '#788493', lineStyle: 'dotted' },
    lower: { label: 'Lower band', color: '#788493', lineStyle: 'dashed' },
  },
  zones: {
    fill: { label: 'Band fill', color: '#B7A1C8', opacity: 0.1 },
  },
  presets: [
    { id: 'extremes', name: 'Connors RSI (90/10 bands)', shortName: 'CRSI 90/10', inputs: { upperBand: 90, lowerBand: 10 } },
  ],
  docs: {
    overview: 'Connors RSI (Larry Connors) averages three short-term measures on a 0-100 scale: a 3-bar RSI of price, a 2-bar RSI of the streak (how many closes in a row were up, as a positive count, or down, as a negative count), and the percent rank of the latest one-bar percent change among the previous 100 bars.',
    howToRead: 'It is built for short-term mean reversion. High readings mean price rose quickly, for several bars in a row, and by more than usual; low readings the opposite. Connors bought pullbacks in uptrends when it fell below 10 (or 5) and exited when it rose above 90 or 95; TradingView draws 70 and 30.\n\nIt turns quickly and spends little time in the middle, so use it to time entries inside a trend you have identified elsewhere, not to define the trend. Show components draws the three parts to see which one drives a reading.',
    settings: 'Defaults are 3 bars for the RSI, 2 for the streak RSI and 100 for the percent rank, as defined by Connors and used on TradingView. The first value appears on bar Percent rank length + 2 (bar 102 with the defaults). An unchanged close ends a streak (the streak is 0). On a price that does not move at all, all three parts read 100, as on TradingView.',
    notes: 'Matches Connors RSI on TradingView: the percent rank counts the earlier changes that are less than or equal to the latest one. Connors\'s original description counts only those that are strictly less, which gives slightly lower readings when changes repeat. Both RSIs are Wilder\'s RSI.',
  },
  calculate(ctx) {
    const { bars, inputs, ta } = ctx;
    const source = ta.source(bars, inputs.source);
    const rsi = ta.rsi(source, inputs.rsiLength);
    const streakRsi = ta.rsi(streaks(ta, source), inputs.streakLength);
    const change = source.map((value, index) => (index === 0 || source[index - 1] === 0 ? null : (100 * (value - source[index - 1])) / source[index - 1]));
    const rank = ta.percentRank(change, inputs.rankLength);
    const crsi = rsi.map((value, index) => (value === null || streakRsi[index] === null || rank[index] === null
      ? null
      : (value + streakRsi[index] + rank[index]) / 3));
    const hidden = bars.map(() => null);
    const band = (value) => bars.map(() => (inputs.showFill ? value : null));
    return {
      plots: {
        crsi,
        rsi: inputs.showComponents ? rsi : hidden,
        streakRsi: inputs.showComponents ? streakRsi : hidden,
        rank: inputs.showComponents ? rank : hidden,
      },
      levels: { upper: inputs.upperBand, middle: inputs.middleBand, lower: inputs.lowerBand },
      zones: { fill: { upper: band(inputs.upperBand), lower: band(inputs.lowerBand) } },
    };
  },
};

Adapt it with an LLM

Paste this into your assistant and replace the second-to-last line with the change you want.

Start from this Spectral custom indicator: https://spectral.trade/indicators/connors-rsi.js
Format reference: https://spectral.trade/docs/custom-indicators.llm.md
Keep the file format and every rule of the reference; give the result a new id, name, shortName and version, and update docs and input descriptions to match.
Keep its live updates exact and fast (section "Fast live updates" of the reference): carry values from bar to bar only through ctx.ta, and raise live.lookback if the change reads further back; Spectral rejects a file whose live updates differ from a full recalculation or are too slow.
Change I want: <describe the change>
Answer with the complete file in one code block, ready to save as <id>.js.