Lean  $LEAN_TAG$
QuantConnect.Indicators.AdvanceDeclineIndicator Class Reference

The advance-decline indicator compares the number of stocks that closed higher against the number of stocks that closed lower than their previous day's closing prices. More...

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

Public Member Functions

 AdvanceDeclineIndicator (string name, Func< IEnumerable< TradeBar >, decimal > computeSub, Func< decimal, decimal, decimal > computeMain)
 Initializes a new instance of the AdvanceDeclineRatio class More...
 
virtual void Add (Symbol asset)
 Add tracking asset issue More...
 
void AddStock (Symbol asset)
 Deprecated More...
 
virtual void Remove (Symbol asset)
 Remove tracking asset issue More...
 
void RemoveStock (Symbol asset)
 Deprecated More...
 
override void Reset ()
 Resets this indicator to its initial state More...
 

Public Attributes

override bool IsReady => _previousPeriod.Keys.Any()
 Gets a flag indicating when this indicator is ready and fully initialized More...
 
int WarmUpPeriod => 2
 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...
 
override IndicatorResult ValidateAndComputeNextValue (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...
 

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

The advance-decline indicator compares the number of stocks that closed higher against the number of stocks that closed lower than their previous day's closing prices.

Definition at line 28 of file AdvanceDeclineIndicator.cs.

Constructor & Destructor Documentation

◆ AdvanceDeclineIndicator()

QuantConnect.Indicators.AdvanceDeclineIndicator.AdvanceDeclineIndicator ( string  name,
Func< IEnumerable< TradeBar >, decimal >  computeSub,
Func< decimal, decimal, decimal >  computeMain 
)

Initializes a new instance of the AdvanceDeclineRatio class

Definition at line 39 of file AdvanceDeclineIndicator.cs.

Member Function Documentation

◆ Add()

virtual void QuantConnect.Indicators.AdvanceDeclineIndicator.Add ( Symbol  asset)
virtual

Add tracking asset issue

Parameters
assettracking asset issue

Definition at line 50 of file AdvanceDeclineIndicator.cs.

Here is the caller graph for this function:

◆ AddStock()

void QuantConnect.Indicators.AdvanceDeclineIndicator.AddStock ( Symbol  asset)

Deprecated

Definition at line 62 of file AdvanceDeclineIndicator.cs.

Here is the call graph for this function:

◆ Remove()

virtual void QuantConnect.Indicators.AdvanceDeclineIndicator.Remove ( Symbol  asset)
virtual

Remove tracking asset issue

Parameters
assettracking asset issue

Definition at line 71 of file AdvanceDeclineIndicator.cs.

Here is the caller graph for this function:

◆ RemoveStock()

void QuantConnect.Indicators.AdvanceDeclineIndicator.RemoveStock ( Symbol  asset)

Deprecated

Definition at line 80 of file AdvanceDeclineIndicator.cs.

Here is the call graph for this function:

◆ ComputeNextValue()

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

Here is the caller graph for this function:

◆ ValidateAndComputeNextValue()

override IndicatorResult QuantConnect.Indicators.AdvanceDeclineIndicator.ValidateAndComputeNextValue ( 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 130 of file AdvanceDeclineIndicator.cs.

Here is the call graph for this function:

◆ Reset()

override void QuantConnect.Indicators.AdvanceDeclineIndicator.Reset ( )

Resets this indicator to its initial state

Definition at line 146 of file AdvanceDeclineIndicator.cs.

Here is the caller graph for this function:

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.AdvanceDeclineIndicator.IsReady => _previousPeriod.Keys.Any()

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

Definition at line 88 of file AdvanceDeclineIndicator.cs.

◆ WarmUpPeriod

int QuantConnect.Indicators.AdvanceDeclineIndicator.WarmUpPeriod => 2

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

Definition at line 93 of file AdvanceDeclineIndicator.cs.


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