Lean  $LEAN_TAG$
QuantConnect.Indicators.McClellanOscillator Class Reference

The McClellan Oscillator is a market breadth indicator which was developed by Sherman and Marian McClellan. It is based on the difference between the number of advancing and declining periods. More...

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

Public Member Functions

 McClellanOscillator (string name, int fastPeriod=19, int slowPeriod=39)
 Initializes a new instance of the McClellanOscillator class

Parameters
nameThe name of the indicator
fastPeriodThe fast period of EMA of advance decline difference
slowPeriodThe slow period of EMA of advance decline difference
More...
 
 McClellanOscillator (int fastPeriod=19, int slowPeriod=39)
 Initializes a new instance of the McClellanOscillator class

Parameters
fastPeriodThe fast period of EMA of advance decline difference
slowPeriodThe slow period of EMA of advance decline difference
More...
 
override void Reset ()
 Resets this indicator to its initial state More...
 
void Add (Symbol asset)
 Add Tracking asset issue More...
 
void Remove (Symbol asset)
 Remove Tracking asset issue More...
 

Public Attributes

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

Protected Member Functions

override decimal ComputeNextValue (TradeBar input)
 Computes the next value of this indicator from the given state More...
 
- Protected Member Functions inherited from QuantConnect.Indicators.TradeBarIndicator
 TradeBarIndicator (string name)
 Creates a new TradeBarIndicator with the specified name More...
 

Properties

ExponentialMovingAverage EMAFast [get]
 Fast period EMA of advance decline difference More...
 
ExponentialMovingAverage EMASlow [get]
 Slow period EMA of advance decline difference More...
 
AdvanceDeclineDifference ADDifference [get]
 The number of advance assets minus the number of decline assets 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

The McClellan Oscillator is a market breadth indicator which was developed by Sherman and Marian McClellan. It is based on the difference between the number of advancing and declining periods.

Definition at line 26 of file McClellanOscillator.cs.

Constructor & Destructor Documentation

◆ McClellanOscillator() [1/2]

QuantConnect.Indicators.McClellanOscillator.McClellanOscillator ( string  name,
int  fastPeriod = 19,
int  slowPeriod = 39 
)

Initializes a new instance of the McClellanOscillator class

Parameters
nameThe name of the indicator
fastPeriodThe fast period of EMA of advance decline difference
slowPeriodThe slow period of EMA of advance decline difference

Definition at line 61 of file McClellanOscillator.cs.

◆ McClellanOscillator() [2/2]

QuantConnect.Indicators.McClellanOscillator.McClellanOscillator ( int  fastPeriod = 19,
int  slowPeriod = 39 
)

Initializes a new instance of the McClellanOscillator class

Parameters
fastPeriodThe fast period of EMA of advance decline difference
slowPeriodThe slow period of EMA of advance decline difference

Definition at line 79 of file McClellanOscillator.cs.

Member Function Documentation

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.McClellanOscillator.ComputeNextValue ( TradeBar  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 89 of file McClellanOscillator.cs.

◆ Reset()

override void QuantConnect.Indicators.McClellanOscillator.Reset ( )

Resets this indicator to its initial state

Definition at line 99 of file McClellanOscillator.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Add()

void QuantConnect.Indicators.McClellanOscillator.Add ( Symbol  asset)

Add Tracking asset issue

Parameters
assetthe tracking asset issue

Definition at line 113 of file McClellanOscillator.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Remove()

void QuantConnect.Indicators.McClellanOscillator.Remove ( Symbol  asset)

Remove Tracking asset issue

Parameters
assetthe tracking asset issue

Definition at line 122 of file McClellanOscillator.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.McClellanOscillator.IsReady => EMASlow.IsReady

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

Definition at line 48 of file McClellanOscillator.cs.

◆ WarmUpPeriod

int QuantConnect.Indicators.McClellanOscillator.WarmUpPeriod => EMASlow.WarmUpPeriod + ADDifference.WarmUpPeriod

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

Definition at line 53 of file McClellanOscillator.cs.

Property Documentation

◆ EMAFast

ExponentialMovingAverage QuantConnect.Indicators.McClellanOscillator.EMAFast
get

Fast period EMA of advance decline difference

Definition at line 33 of file McClellanOscillator.cs.

◆ EMASlow

ExponentialMovingAverage QuantConnect.Indicators.McClellanOscillator.EMASlow
get

Slow period EMA of advance decline difference

Definition at line 38 of file McClellanOscillator.cs.

◆ ADDifference

AdvanceDeclineDifference QuantConnect.Indicators.McClellanOscillator.ADDifference
get

The number of advance assets minus the number of decline assets

Definition at line 43 of file McClellanOscillator.cs.


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