Lean  $LEAN_TAG$
QuantConnect.Indicators.ConnorsRelativeStrengthIndex Class Reference

Represents the Connors Relative Strength Index (CRSI), a combination of the traditional Relative Strength Index (RSI), a Streak RSI (SRSI), and
Percent Rank. This index is designed to provide a more robust measure of market strength by combining momentum, streak behavior, and price change. More...

Inheritance diagram for QuantConnect.Indicators.ConnorsRelativeStrengthIndex:
[legend]

Public Member Functions

 ConnorsRelativeStrengthIndex (string name, int rsiPeriod, int rsiPeriodStreak, int lookBackPeriod)
 Initializes a new instance of the ConnorsRelativeStrengthIndex class. More...
 
 ConnorsRelativeStrengthIndex (int rsiPeriod, int rsiPeriodStreak, int rocPeriod)
 Initializes a new instance of the ConnorsRelativeStrengthIndex with specified RSI, Streak RSI, and lookBack periods, using a default name format based on the provided parameters. More...
 
override void Reset ()
 Resets the indicator to its initial state. This clears all internal data and resets the RSI, Streak RSI, and PriceChangeRatios, as well as the trend streak counter. More...
 

Public Attributes

override bool IsReady => _rsi.IsReady && _srsi.IsReady && _priceChangeRatios.IsReady
 Gets a value indicating whether the indicator is ready for use. The indicator is ready when all its components (RSI, SRSI, and PriceChangeRatios) are ready. More...
 

Protected Member Functions

override decimal ComputeNextValue (IndicatorDataPoint input)
 Computes the next value for the Connors Relative Strength Index (CRSI) based on the latest input data point. The CRSI is calculated as the average of the traditional RSI, Streak RSI, and Percent Rank. More...
 
- Protected Member Functions inherited from QuantConnect.Indicators.Indicator
 Indicator (string name)
 Initializes a new instance of the Indicator class using the specified name. More...
 

Properties

int WarmUpPeriod [get]
 Gets the warm-up period required for the indicator to be ready. This is the maximum period of all components (RSI, SRSI, and PriceChangeRatios). More...
 
- Properties inherited from QuantConnect.Indicators.Indicator
static int DefaultWindowSize = 2 [get]
 The default size of the history window for the indicator More...
 
- Properties inherited from QuantConnect.Indicators.IIndicatorWarmUpPeriodProvider
int WarmUpPeriod [get]
 Required period, in data points, for the indicator to be ready and fully initialized. More...
 

Detailed Description

Represents the Connors Relative Strength Index (CRSI), a combination of the traditional Relative Strength Index (RSI), a Streak RSI (SRSI), and
Percent Rank. This index is designed to provide a more robust measure of market strength by combining momentum, streak behavior, and price change.

Definition at line 28 of file ConnorsRelativeStrengthIndex.cs.

Constructor & Destructor Documentation

◆ ConnorsRelativeStrengthIndex() [1/2]

QuantConnect.Indicators.ConnorsRelativeStrengthIndex.ConnorsRelativeStrengthIndex ( string  name,
int  rsiPeriod,
int  rsiPeriodStreak,
int  lookBackPeriod 
)

Initializes a new instance of the ConnorsRelativeStrengthIndex class.

Parameters
nameThe name of the indicator instance.
rsiPeriodThe period for the RSI calculation.
rsiPeriodStreakThe period for the Streak RSI calculation.
lookBackPeriodThe period for calculating the Percent Rank.

Definition at line 62 of file ConnorsRelativeStrengthIndex.cs.

◆ ConnorsRelativeStrengthIndex() [2/2]

QuantConnect.Indicators.ConnorsRelativeStrengthIndex.ConnorsRelativeStrengthIndex ( int  rsiPeriod,
int  rsiPeriodStreak,
int  rocPeriod 
)

Initializes a new instance of the ConnorsRelativeStrengthIndex with specified RSI, Streak RSI, and lookBack periods, using a default name format based on the provided parameters.

Definition at line 75 of file ConnorsRelativeStrengthIndex.cs.

Member Function Documentation

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.ConnorsRelativeStrengthIndex.ComputeNextValue ( IndicatorDataPoint  input)
protected

Computes the next value for the Connors Relative Strength Index (CRSI) based on the latest input data point. The CRSI is calculated as the average of the traditional RSI, Streak RSI, and Percent Rank.

Parameters
inputThe current input data point (typically the price data for the current period).
Returns
The computed CRSI value, which combines the RSI, Streak RSI, and Percent Rank into a single value. Returns zero if the indicator is not yet ready.

Definition at line 99 of file ConnorsRelativeStrengthIndex.cs.

◆ Reset()

override void QuantConnect.Indicators.ConnorsRelativeStrengthIndex.Reset ( )

Resets the indicator to its initial state. This clears all internal data and resets the RSI, Streak RSI, and PriceChangeRatios, as well as the trend streak counter.

Definition at line 168 of file ConnorsRelativeStrengthIndex.cs.

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.ConnorsRelativeStrengthIndex.IsReady => _rsi.IsReady && _srsi.IsReady && _priceChangeRatios.IsReady

Gets a value indicating whether the indicator is ready for use. The indicator is ready when all its components (RSI, SRSI, and PriceChangeRatios) are ready.

Definition at line 84 of file ConnorsRelativeStrengthIndex.cs.

Property Documentation

◆ WarmUpPeriod

int QuantConnect.Indicators.ConnorsRelativeStrengthIndex.WarmUpPeriod
get

Gets the warm-up period required for the indicator to be ready. This is the maximum period of all components (RSI, SRSI, and PriceChangeRatios).

Definition at line 90 of file ConnorsRelativeStrengthIndex.cs.


The documentation for this class was generated from the following file: