Lean
$LEAN_TAG$
|
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...
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... | |
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.
QuantConnect.Indicators.ConnorsRelativeStrengthIndex.ConnorsRelativeStrengthIndex | ( | string | name, |
int | rsiPeriod, | ||
int | rsiPeriodStreak, | ||
int | lookBackPeriod | ||
) |
Initializes a new instance of the ConnorsRelativeStrengthIndex class.
name | The name of the indicator instance. |
rsiPeriod | The period for the RSI calculation. |
rsiPeriodStreak | The period for the Streak RSI calculation. |
lookBackPeriod | The period for calculating the Percent Rank. |
Definition at line 62 of file ConnorsRelativeStrengthIndex.cs.
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.
|
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.
input | The current input data point (typically the price data for the current period). |
Definition at line 99 of file ConnorsRelativeStrengthIndex.cs.
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.
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.
|
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.