Lean  $LEAN_TAG$
QuantConnect.Indicators.WindowIndicator< T > Class Template Referenceabstract

Represents an indicator that acts on a rolling window of data More...

Inheritance diagram for QuantConnect.Indicators.WindowIndicator< T >:
[legend]

Public Member Functions

override void Reset ()
 Resets this indicator to its initial state More...
 

Public Attributes

int Period => _window.Size
 Gets the period of this window indicator More...
 
override bool IsReady => _window.IsReady
 Gets a flag indicating when this indicator is ready and fully initialized More...
 
virtual int WarmUpPeriod => Period
 Required period, in data points, to the indicator to be ready and fully initialized More...
 

Protected Member Functions

 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

- 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 an indicator that acts on a rolling window of data

Type Constraints
T :IBaseData 

Definition at line 23 of file WindowIndicator.cs.

Constructor & Destructor Documentation

◆ WindowIndicator()

QuantConnect.Indicators.WindowIndicator< T >.WindowIndicator ( string  name,
int  period 
)
protected

Initializes a new instance of the WindowIndicator class

Parameters
nameThe name of this indicator
periodThe number of data points to hold in the window

Definition at line 39 of file WindowIndicator.cs.

Member Function Documentation

◆ ComputeNextValue() [1/2]

override decimal QuantConnect.Indicators.WindowIndicator< T >.ComputeNextValue ( input)
protected

Computes the next value of this indicator from the given state

Parameters
inputThe input given to the indicator
Returns
A new value for this indicator

Definition at line 60 of file WindowIndicator.cs.

Here is the caller graph for this function:

◆ Reset()

override void QuantConnect.Indicators.WindowIndicator< T >.Reset ( )

Resets this indicator to its initial state

Definition at line 69 of file WindowIndicator.cs.

Here is the caller graph for this function:

◆ ComputeNextValue() [2/2]

abstract decimal QuantConnect.Indicators.WindowIndicator< T >.ComputeNextValue ( IReadOnlyWindow< T >  window,
input 
)
protectedpure virtual

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

Member Data Documentation

◆ Period

Gets the period of this window indicator

Definition at line 32 of file WindowIndicator.cs.

◆ IsReady

override bool QuantConnect.Indicators.WindowIndicator< T >.IsReady => _window.IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Definition at line 48 of file WindowIndicator.cs.

◆ WarmUpPeriod

virtual int QuantConnect.Indicators.WindowIndicator< T >.WarmUpPeriod => Period

Required period, in data points, to the indicator to be ready and fully initialized

Definition at line 53 of file WindowIndicator.cs.


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