Bentrix Docs
HomePricingDashboard

Connors RSI

Oscillatorsoscillatorone linein every package

The mean of three readings between 0 and 100: a short RSI of the price, an RSI of how many bars in a row the price has risen or fallen, and the rank of the latest one-bar return among the previous ones.

It measures how stretched the latest moves are, between 0 and 100.

01The study, live

Live figureScroll to zoom, drag the bars to pan.
1090
bar —O — H — L — C —main line —first value at —
Show where:

Computed by Bentrix’s own code over the same synthetic bars on every page — an illustration of how the study behaves, not a market.

What this figure shows

The figure is computed over 300 sample bars. CRSI has no value on the first 101 — the bars it needs before it can answer — and its first value stands on bar 102. Its line runs between 0.2789 and 97.49 on these bars, and the last value is 45.49. The pane's scale is fixed at 0 to 100, the range the study can take. Counting the conditions the study declares on these bars: crosses above 10 7 times; crosses below 10 7 times; crosses above 90 twice; crosses below 90 twice. Press a condition under the figure to see each place marked. As states rather than moments: is above 10 on 190 bars; is below 10 on 9 bars; is above 90 on 3 bars; is below 90 on 196 bars.

02Its parts, named

The bars it readseach bar's close, unless you chooseanother priceWarm-upno value on the first 101 bars: thestudy needs them before it cananswerLevel 90a fixed reference the study is readagainstThe main linethe study's own value on each barLevel 10a fixed reference the study is readagainst
Computed by Bentrix’s own code over the sample bars. It is drawn on once, as you reach the figure.

03What you see

A line in its own pane between 0 and 100. It moves faster than the ordinary RSI and visits its extremes often.

04Where it comes from

Larry Connors and his research team published it in 2012 as an oscillator for very short horizons, built from three ideas: how one-sided the last few changes were, how long the current streak of up or down closes has run, and how large today's change is against the last hundred.

05The formula

CRSI=13(RSI(C,3)+RSI(Streak,2)+PercentRank(ROC(C,1),100))
Cthe close
Streakthe run of up or down closes, signed: +1,+2,… or −1,−2,…
PercentRank(x,100)the share of the last 100 values of x below this one

The streak counts consecutive up closes as +1,+2,… and consecutive down closes as −1,−2,…, resetting to 0 on an unchanged close; its RSI measures how unusual the streak is.

06A worked example

Three parts are averaged. Take one bar:

  1. RSI of the close over 3 bars: 72.0.
  2. RSI of the streak over 2 bars. The streak counts consecutive closes in one direction — +1, +2, +3 for three rises, −1 for a first fall, 0 for an unchanged close. After three rises the streak series reads …, 1, 2, 3, and its 2-bar RSI is 100.0.
  3. Percent rank of today's return over 100 bars: today's one-bar change was larger than 88 of the previous 100: 88.0.

ConnorsRSI = (72.0 + 100.0 + 88.0) / 3 = 86.7

All three are fast: a 3-bar RSI, a 2-bar RSI and a one-bar return. The index is built to reach its extremes within a few bars.

On real closes — 20, 21, 23, 22, 24, 25, 24, 26 — with a 3-bar RSI, a 2-bar streak RSI and a rank over 4 bars: on the last bar the RSI of the close is 80.77; the streak series reads 0, 1, 2, −1, 1, 2, −1, 1 and its RSI is 60.29; and the last change, +8.33 %, is larger than 3 of the 4 before it, a rank of 75.00. ConnorsRSI = (80.77 + 60.29 + 75.00) / 3 = 72.02.

07Built in Assay

The same study written in Assay, Bentrix’s script language, and drawn by Bentrix itself as the script’s graph: each block is one step of the formula. On the ladder the steps stand in the script’s order, one a row; on the board each wire carries a value from the block that gives it to the block that reads it, left to right. The script computes exactly what the study computes — Bentrix checks the two against each other, candle by candle.

THE SCRIPT’S GRAPH
//@version=6
indicator("Connors RSI")
rsiLength = input.int(3, "RSI length")
streakLength = input.int(2, "Streak length")
rankLength = input.int(100, "Rank length")
// The run of higher closes (counted up) or lower closes (counted down); an unchanged close resets it to 0.
var float streak = na
if bar_index > 0
    streak := close > close[1] ? (streak > 0 ? streak + 1 : 1) : close < close[1] ? (streak < 0 ? streak - 1 : -1) : 0
priceRsi = ta.rsi(close, rsiLength)
streakRsi = ta.rsi(streak, streakLength)
// This bar's return, ranked among the returns of the rankLength bars before it.
ret = (close - close[1]) / close[1]
int below = 0
for k = 1 to rankLength
    if ret[k] < ret
        below += 1
rank = bar_index > rankLength ? 100.0 * below / rankLength : na
// The three readings, each from 0 to 100, averaged.
crsi = (priceRsi + streakRsi + rank) / 3
plot(crsi, "CRSI")

Paste it into the Assay IDE to put it on a chart, or to change it. Looking at the graph is free in every package; editing it as blocks is Plus.

08Readings — what traders look for

Very high and very low values. Readings above about 90 or below about 10 are read as short-term stretches of unusual size on all three counts at once.

The streak's share. A long run of closes in one direction pushes the middle term to an extreme even when each change was small.

How readings above 90 or below 10 fail. Connors used the extremes as a short-term mean-reversion gauge on stocks, in an up-trend and for holding periods of days. A reading of 5 says the last few closes fell hard and steadily; in a market that is breaking down, that is how every day of the break looks.

09In different markets and timeframes

ConnorsRSI is a very short-term gauge made of three quick measures. Connors described its extremes on daily stock data, with the larger trend as a filter.

Its three parts use windows of 3, 2 and 100 bars, so it reacts within a bar or two and reaches 90 or 10 several times a month on daily data. In a strong trend those extremes cluster on the trend's side: an index rising steadily shows many high readings and few low ones. Connors' work was on daily bars of liquid stocks and index funds; on intraday bars the streak component counts runs of a few minutes, which are close to random, and the reading loses the meaning his tests gave it.

10With other studies

Read beside a 200-bar average for that filter, and beside the plain 2 or 3-bar RSI.

11What it does not tell you

!

It is built for horizons of a few bars, so its extremes are frequent, and an extreme says the last few bars were one-sided — not that the next bar turns.

12Inputs and defaults

CRSI (3, 2)settings card
1Time Period3
2Streak Period2
3Rank Period100
4Applied priceClose
5TimeframeChart
6Wait for the candle to closeOn
  1. 1
    Time Period — 3Time period
  2. 2
    Streak Period — 2Time period of the RSI of the up/down streak
  3. 3
    Rank Period — 100Number of previous one-bar returns the current one is ranked against
  4. 4
    Applied price — CloseAny of the seven prices, and several at once, each its own line with its own look.
  5. 5
    Timeframe — ChartThe chart's own by default; any higher one, read on the last closed candle. A finer one is never offered.
  6. 6
    Wait for the candle to close — OnThe value of a higher timeframe is taken only from a candle that has finished.

What each input changes

  • Time PeriodThe RSI of the close (3).
  • Streak PeriodThe RSI of the up-or-down streak (2).
  • Rank PeriodHow many past returns today's return is ranked against (100).
  • In use3, 2 and 100 are Connors'.

13Limits and common misreadings

Three parts, one number. The same reading can come from a long streak of small changes or from one very large change; look at the bars.

The hundred-bar rank needs a hundred bars of history before it is fully formed.

14Conditions an alert or a strategy can watch

crosses above 10 eventcrosses below 10 eventis above 10 stateis below 10 statecrosses above 90 eventcrosses below 90 eventis above 90 stateis below 90 state

Event: the bar it happens on an event happens on one barState: every bar while it holds a state holds on every bar while it lasts

These are the conditions the study itself declares — the same rules the alert editor and the strategy engine read, and the ones the figure's chips show.

15Practise it in the laboratory

Attach Connors RSI and RSI(14) on an M15 replay. Count how many times each visits its extreme zone in one day, and look at what price did in the five bars after each visit.

Open the laboratory

17In Bentrix

  • From the menu: a chart's Indicators button › Oscillators › CRSI, or type CRSI in its search.
  • Its settings: the settings card opens when it is added; its legend's name opens it again.

18From an agent or a program

Two tools reach it. study_values computes it over a workbench’s candles up to the clock — no chart needed — and study_attach puts it on a chart, where it is drawn and saved with the chart ({"chart": "<chart uri>", "kind": "crsi"}).

The study, as a chart files it

This is a new CRSI’s entry — its kind, its calculation, the price it reads and its settings. Change a setting here to read it with other inputs.

{
  "applied": "close",
  "convention": "talib",
  "kind": "crsi",
  "settings": {
    "shape": "ta",
    "values": {
      "optInRankPeriod": 100.0,
      "optInStreakPeriod": 2.0,
      "optInTimePeriod": 3.0
    }
  }
}

An agent

An agent calls the MCP tool with it:

{
  "name": "study_values",
  "arguments": {
    "bench": "bentrix://lab/\u2026/bench/\u2026",
    "symbol": "EURUSD",
    "timeframe": "H1",
    "limit": 5,
    "study": {
      "applied": "close",
      "convention": "talib",
      "kind": "crsi",
      "settings": {
        "shape": "ta",
        "values": {
          "optInRankPeriod": 100.0,
          "optInStreakPeriod": 2.0,
          "optInTimePeriod": 3.0
        }
      }
    }
  }
}

A program

A program does the same in its language — bench and market as in the built-in indicators guide:

Python

values = client.study.values(bench, market, "H1", {"applied": "close", "convention": "talib", "kind": "crsi", "settings": {"shape": "ta", "values": {"optInRankPeriod": 100.0, "optInStreakPeriod": 2.0, "optInTimePeriod": 3.0}}}, limit=5)
print("times:", values["times"])
for line in values["lines"]:
    print("line:", line["line"])
    print("  newest values:", line["values"])

JSJavaScript

const values = await client.study.values({ bench, symbol: market, timeframe: "H1", study: { "applied": "close", "convention": "talib", "kind": "crsi", "settings": { "shape": "ta", "values": { "optInRankPeriod": 100.0, "optInStreakPeriod": 2.0, "optInTimePeriod": 3.0 } } }, limit: 5 });
console.log("times:", values.times);
for (const line of values.lines) {
  console.log("line:", line.line);
  console.log("  newest values:", line.values);
}

C#C#

var values = await client.Study.Values(bench, market, "H1", new Dictionary<string, object?> { ["applied"] = "close", ["convention"] = "talib", ["kind"] = "crsi", ["settings"] = new Dictionary<string, object?> { ["shape"] = "ta", ["values"] = new Dictionary<string, object?> { ["optInRankPeriod"] = 100.0, ["optInStreakPeriod"] = 2.0, ["optInTimePeriod"] = 3.0 } } }, limit: 5);
Console.WriteLine($"times: {values!["times"]!}");
foreach (var line in values!["lines"]!.AsArray())
{
    Console.WriteLine($"line: {line!["line"]!}");
    Console.WriteLine($"  newest values: {line!["values"]!}");
}

GOGo

values := must(client.Study.Values(ctx, mcp.StudyValuesArgs{Bench: bench, Symbol: market, Timeframe: "H1", Study: map[string]any{"applied": "close", "convention": "talib", "kind": "crsi", "settings": map[string]any{"shape": "ta", "values": map[string]any{"optInRankPeriod": 100.0, "optInStreakPeriod": 2.0, "optInTimePeriod": 3.0}}}, Limit: mcp.Ptr[int64](5)}))
fmt.Println("times:", at(values, "times"))
for _, line := range at(values, "lines").([]any) {
	fmt.Println("line:", at(line, "line"))
	fmt.Println("  newest values:", at(line, "values"))
}

Java

Object values = client.study.values(new Bentrix.StudyApi.ValuesArgs(bench, market, "H1", obj("applied", "close", "convention", "talib", "kind", "crsi", "settings", obj("shape", "ta", "values", obj("optInRankPeriod", 100.0, "optInStreakPeriod", 2.0, "optInTimePeriod", 3.0)))).limit(5L));
System.out.println("times:" + " " + at(values, "times"));
for (Object line : (List<Object>) at(values, "lines")) {
    System.out.println("line:" + " " + at(line, "line"));
    System.out.println("  newest values:" + " " + at(line, "values"));
}

C++C++

auto values = client.study.values_(StudyApi::ValuesArgs(bench, market, "H1", Json::Object{{"applied", "close"}, {"convention", "talib"}, {"kind", "crsi"}, {"settings", Json::Object{{"shape", "ta"}, {"values", Json::Object{{"optInRankPeriod", 100.0}, {"optInStreakPeriod", 2.0}, {"optInTimePeriod", 3.0}}}}}}).limit(5));
std::cout << "times:" << " " << values["times"].dump() << std::endl;
for (const Json &line : values["lines"].arr()) {
    std::cout << "line:" << " " << line["line"].dump() << std::endl;
    std::cout << "  newest values:" << " " << line["values"].dump() << std::endl;
}

Julia

values = client.study.values(bench, market, "H1", Dict{String,Any}("applied" => "close", "convention" => "talib", "kind" => "crsi", "settings" => Dict{String,Any}("shape" => "ta", "values" => Dict{String,Any}("optInRankPeriod" => 100.0, "optInStreakPeriod" => 2.0, "optInTimePeriod" => 3.0))); limit = 5)
println("times:", " ", values["times"])
for line in values["lines"]
    println("line:", " ", line["line"])
    println("  newest values:", " ", line["values"])
end

RR

values <- client$study$values(bench, market, "H1", list(applied = "close", convention = "talib", kind = "crsi", settings = list(shape = "ta", values = list(optInRankPeriod = 100.0, optInStreakPeriod = 2.0, optInTimePeriod = 3.0))), limit = 5)
cat("times:", format(values$times), "\n")
for (line in values$lines) {
  cat("line:", format(line$line), "\n")
  cat("  newest values:", format(line$values), "\n")
}

RRust

let values = client.study().values(mcp::StudyValuesArgs::new(bench.clone(), market.clone(), "H1", serde_json::json!({"applied": "close", "convention": "talib", "kind": "crsi", "settings": {"shape": "ta", "values": {"optInRankPeriod": 100.0, "optInStreakPeriod": 2.0, "optInTimePeriod": 3.0}}})).limit(5))?;
println!("times: {}", values["times"]);
for line in values["lines"].as_array().into_iter().flatten() {
    println!("line: {}", line["line"]);
    println!("  newest values: {}", line["values"]);
}

Reading the answer

  • times — the candles’ open times, in milliseconds since 1970 (UTC), oldest first.
  • lines — one entry per line, in this order, each with its line name and its values; values[i] belongs to the candle at times[i].
  • The last value is the candle at the clock’s, which may still be forming: it changes until that candle closes, as on the chart. Nothing after the clock is ever computed.
  • null is a candle with no value yet — the warm-up, about 1 × the period at the start of the history.
  • Its fixed levels, drawn on the chart: [10.0, 90.0].
lineWhat it is
Mainthe indicator's own value

In a strategy

Filed under a key of your choice in a strategy document’s studies — here crsi: {"crsi": {"applied": "close", "convention": "talib", "kind": "crsi", "settings": {"shape": "ta", "values": {"optInRankPeriod": 100.0, "optInStreakPeriod": 2.0, "optInTimePeriod": 3.0}}}} — its rules can name:

WriteWhat it is
crsiits main line, as a value in a compare
{"cond": "crsi:level.cross_up:10"}a condition it declares itself
{"cond": "crsi:level.cross_down:10"}a condition it declares itself
{"cond": "crsi:level.above:10"}a condition it declares itself
{"cond": "crsi:level.below:10"}a condition it declares itself
{"cond": "crsi:level.cross_up:90"}a condition it declares itself
{"cond": "crsi:level.cross_down:90"}a condition it declares itself
{"cond": "crsi:level.above:90"}a condition it declares itself
{"cond": "crsi:level.below:90"}a condition it declares itself

19Sources

  1. Connors, Larry, Alvarez, Cesar & Radtke, Matt. An Introduction to ConnorsRSI. Connors Research, 2012.

Bentrix 0.1.382Every number, name and default on these pages is read from the application itself.What is comingWhat changed