Lean  $LEAN_TAG$
QuantConnect.Indicators.RateOfChangeRatio Class Reference

This indicator computes the Rate Of Change Ratio (ROCR). The Rate Of Change Ratio is calculated with the following formula: ROCR = price / prevPrice More...

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

Public Member Functions

 RateOfChangeRatio (string name, int period)
 Initializes a new instance of the RateOfChangeRatio class using the specified name and period. More...
 
 RateOfChangeRatio (int period)
 Initializes a new instance of the RateOfChangeRatio class using the specified period. More...
 
- Public Member Functions inherited from QuantConnect.Indicators.RateOfChange
 RateOfChange (int period)
 Creates a new RateOfChange indicator with the specified period More...
 
 RateOfChange (string name, int period)
 Creates a new RateOfChange indicator with the specified period More...
 
- Public Member Functions inherited from QuantConnect.Indicators.WindowIndicator< IndicatorDataPoint >
override void Reset ()
 Resets this indicator to its initial state More...
 

Protected Member Functions

override decimal ComputeNextValue (IReadOnlyWindow< IndicatorDataPoint > window, IndicatorDataPoint input)
 Computes the next value for this indicator from the given state. More...
 
- Protected Member Functions inherited from QuantConnect.Indicators.RateOfChange
override decimal ComputeNextValue (IReadOnlyWindow< IndicatorDataPoint > window, IndicatorDataPoint input)
 Computes the next value for this indicator from the given state. More...
 
- Protected Member Functions inherited from QuantConnect.Indicators.WindowIndicator< IndicatorDataPoint >
 WindowIndicator (string name, int period)
 Initializes a new instance of the WindowIndicator class More...
 
override decimal ComputeNextValue (T input)
 Computes the next value of this indicator from the given state More...
 
abstract decimal ComputeNextValue (IReadOnlyWindow< T > window, T input)
 Computes the next value for this indicator from the given state. More...
 

Additional Inherited Members

- Public Attributes inherited from QuantConnect.Indicators.RateOfChange
override bool IsReady => Samples > Period
 Gets a flag indicating when this indicator is ready and fully initialized. More...
 
int WarmUpPeriod => Period + 1
 Required period, in data points, for the indicator to be ready and fully initialized. Our formula is Period + 1 because we need to fill the window and have one removed before it is ready. More...
 
- Public Attributes inherited from QuantConnect.Indicators.WindowIndicator< IndicatorDataPoint >
int Period
 Gets the period of this window indicator More...
 
override bool IsReady
 Gets a flag indicating when this indicator is ready and fully initialized More...
 
virtual int WarmUpPeriod
 Required period, in data points, to the indicator to be ready and fully initialized 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

This indicator computes the Rate Of Change Ratio (ROCR). The Rate Of Change Ratio is calculated with the following formula: ROCR = price / prevPrice

Definition at line 23 of file RateOfChangeRatio.cs.

Constructor & Destructor Documentation

◆ RateOfChangeRatio() [1/2]

QuantConnect.Indicators.RateOfChangeRatio.RateOfChangeRatio ( string  name,
int  period 
)

Initializes a new instance of the RateOfChangeRatio class using the specified name and period.

Parameters
nameThe name of this indicator
periodThe period of the ROCR

Definition at line 30 of file RateOfChangeRatio.cs.

◆ RateOfChangeRatio() [2/2]

QuantConnect.Indicators.RateOfChangeRatio.RateOfChangeRatio ( int  period)

Initializes a new instance of the RateOfChangeRatio class using the specified period.

Parameters
periodThe period of the ROCR

Definition at line 39 of file RateOfChangeRatio.cs.

Member Function Documentation

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.RateOfChangeRatio.ComputeNextValue ( IReadOnlyWindow< IndicatorDataPoint window,
IndicatorDataPoint  input 
)
protected

Computes the next value for this indicator from the given state.

Parameters
windowThe window of data held in this indicator
inputThe input value to this indicator on this time step
Returns
A new value for this indicator

Definition at line 50 of file RateOfChangeRatio.cs.


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