Lean  $LEAN_TAG$
QuantConnect.Indicators.Momentum Class Reference

This indicator computes the n-period change in a value using the following: value_0 - value_n More...

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

Public Member Functions

 Momentum (int period)
 Creates a new Momentum indicator with the specified period More...
 
 Momentum (string name, int period)
 Creates a new Momentum 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...
 

Public Attributes

override int WarmUpPeriod => Period + 1
 Required period, in data points, for the indicator to be ready and fully initialized. More...
 
override bool IsReady => Samples > Period
 Gets a flag indicating when this indicator is ready and fully initialized 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...
 

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.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

- 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 n-period change in a value using the following: value_0 - value_n

Definition at line 22 of file Momentum.cs.

Constructor & Destructor Documentation

◆ Momentum() [1/2]

QuantConnect.Indicators.Momentum.Momentum ( int  period)

Creates a new Momentum indicator with the specified period

Parameters
periodThe period over which to perform to computation

Definition at line 38 of file Momentum.cs.

◆ Momentum() [2/2]

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

Creates a new Momentum indicator with the specified period

Parameters
nameThe name of this indicator
periodThe period over which to perform to computation

Definition at line 48 of file Momentum.cs.

Member Function Documentation

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.Momentum.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 59 of file Momentum.cs.

Member Data Documentation

◆ WarmUpPeriod

override int QuantConnect.Indicators.Momentum.WarmUpPeriod => Period + 1

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

Definition at line 27 of file Momentum.cs.

◆ IsReady

override bool QuantConnect.Indicators.Momentum.IsReady => Samples > Period

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

Definition at line 32 of file Momentum.cs.


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