Lean  $LEAN_TAG$
QuantConnect.Indicators.MidPoint Class Reference

This indicator computes the MidPoint (MIDPOINT) The MidPoint is calculated using the following formula: MIDPOINT = (Highest Value + Lowest Value) / 2 More...

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

Public Member Functions

 MidPoint (string name, int period)
 Initializes a new instance of the MidPoint class using the specified name and period. More...
 
 MidPoint (int period)
 Initializes a new instance of the MidPoint class using the specified period. More...
 
override void Reset ()
 Resets this indicator to its initial state More...
 

Public Attributes

override bool IsReady => Samples >= _period
 Gets a flag indicating when this indicator is ready and fully initialized More...
 
int WarmUpPeriod => _period
 Required period, in data points, for the indicator to be ready and fully initialized. More...
 

Protected Member Functions

override decimal ComputeNextValue (IndicatorDataPoint input)
 Computes the next value of 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 MidPoint (MIDPOINT) The MidPoint is calculated using the following formula: MIDPOINT = (Highest Value + Lowest Value) / 2

Definition at line 23 of file MidPoint.cs.

Constructor & Destructor Documentation

◆ MidPoint() [1/2]

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

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

Parameters
nameThe name of this indicator
periodThe period of the MIDPOINT

Definition at line 34 of file MidPoint.cs.

◆ MidPoint() [2/2]

QuantConnect.Indicators.MidPoint.MidPoint ( int  period)

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

Parameters
periodThe period of the MIDPOINT

Definition at line 46 of file MidPoint.cs.

Member Function Documentation

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.MidPoint.ComputeNextValue ( IndicatorDataPoint  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 66 of file MidPoint.cs.

◆ Reset()

override void QuantConnect.Indicators.MidPoint.Reset ( )

Resets this indicator to its initial state

Definition at line 77 of file MidPoint.cs.

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.MidPoint.IsReady => Samples >= _period

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

Definition at line 54 of file MidPoint.cs.

◆ WarmUpPeriod

int QuantConnect.Indicators.MidPoint.WarmUpPeriod => _period

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

Definition at line 59 of file MidPoint.cs.


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