Lean  $LEAN_TAG$
QuantConnect.Indicators.MovingAverageConvergenceDivergence Class Reference

This indicator creates two moving averages defined on a base indicator and produces the difference between the fast and slow averages. More...

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

Public Member Functions

 MovingAverageConvergenceDivergence (int fastPeriod, int slowPeriod, int signalPeriod, MovingAverageType type=MovingAverageType.Exponential)
 Creates a new MACD with the specified parameters More...
 
 MovingAverageConvergenceDivergence (string name, int fastPeriod, int slowPeriod, int signalPeriod, MovingAverageType type=MovingAverageType.Exponential)
 Creates a new MACD with the specified parameters More...
 
override void Reset ()
 Resets this indicator to its initial state More...
 

Public Attributes

override bool IsReady => Signal.IsReady
 Gets a flag indicating when this indicator is 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...
 
- 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

IndicatorBase< IndicatorDataPointFast [get]
 Gets the fast average indicator More...
 
IndicatorBase< IndicatorDataPointSlow [get]
 Gets the slow average indicator More...
 
IndicatorBase< IndicatorDataPointSignal [get]
 Gets the signal of the MACD More...
 
IndicatorBase< IndicatorDataPointHistogram [get]
 Developed by Thomas Aspray in 1986, the MACD-Histogram measures the distance between MACD and its signal line, is an oscillator that fluctuates above and below the zero line. Bullish or bearish divergences in the MACD-Histogram can alert chartists to an imminent signal line crossover in MACD. More...
 
int WarmUpPeriod [get]
 Required period, in data points, for the indicator to be ready and fully initialized. 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...
 

Detailed Description

This indicator creates two moving averages defined on a base indicator and produces the difference between the fast and slow averages.

Definition at line 23 of file MovingAverageConvergenceDivergence.cs.

Constructor & Destructor Documentation

◆ MovingAverageConvergenceDivergence() [1/2]

QuantConnect.Indicators.MovingAverageConvergenceDivergence.MovingAverageConvergenceDivergence ( int  fastPeriod,
int  slowPeriod,
int  signalPeriod,
MovingAverageType  type = MovingAverageType.Exponential 
)

Creates a new MACD with the specified parameters

Parameters
fastPeriodThe fast moving average period
slowPeriodThe slow moving average period
signalPeriodThe signal period
typeThe type of moving averages to use

Definition at line 64 of file MovingAverageConvergenceDivergence.cs.

◆ MovingAverageConvergenceDivergence() [2/2]

QuantConnect.Indicators.MovingAverageConvergenceDivergence.MovingAverageConvergenceDivergence ( string  name,
int  fastPeriod,
int  slowPeriod,
int  signalPeriod,
MovingAverageType  type = MovingAverageType.Exponential 
)

Creates a new MACD with the specified parameters

Parameters
nameThe name of this indicator
fastPeriodThe fast moving average period
slowPeriodThe slow moving average period
signalPeriodThe signal period
typeThe type of moving averages to use

Definition at line 77 of file MovingAverageConvergenceDivergence.cs.

Member Function Documentation

◆ ComputeNextValue()

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

◆ Reset()

override void QuantConnect.Indicators.MovingAverageConvergenceDivergence.Reset ( )

Resets this indicator to its initial state

Definition at line 118 of file MovingAverageConvergenceDivergence.cs.

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.MovingAverageConvergenceDivergence.IsReady => Signal.IsReady

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

Definition at line 50 of file MovingAverageConvergenceDivergence.cs.

Property Documentation

◆ Fast

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.MovingAverageConvergenceDivergence.Fast
get

Gets the fast average indicator

Definition at line 28 of file MovingAverageConvergenceDivergence.cs.

◆ Slow

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.MovingAverageConvergenceDivergence.Slow
get

Gets the slow average indicator

Definition at line 33 of file MovingAverageConvergenceDivergence.cs.

◆ Signal

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.MovingAverageConvergenceDivergence.Signal
get

Gets the signal of the MACD

Definition at line 38 of file MovingAverageConvergenceDivergence.cs.

◆ Histogram

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.MovingAverageConvergenceDivergence.Histogram
get

Developed by Thomas Aspray in 1986, the MACD-Histogram measures the distance between MACD and its signal line, is an oscillator that fluctuates above and below the zero line. Bullish or bearish divergences in the MACD-Histogram can alert chartists to an imminent signal line crossover in MACD.

Definition at line 45 of file MovingAverageConvergenceDivergence.cs.

◆ WarmUpPeriod

int QuantConnect.Indicators.MovingAverageConvergenceDivergence.WarmUpPeriod
get

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

Definition at line 55 of file MovingAverageConvergenceDivergence.cs.


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