Lean  $LEAN_TAG$
QuantConnect.Indicators.AverageDirectionalIndex Class Reference

This indicator computes Average Directional Index which measures trend strength without regard to trend direction. Firstly, it calculates the Directional Movement and the True Range value, and then the values are accumulated and smoothed using a custom smoothing method proposed by Wilder. For an n period smoothing, 1/n of each period's value is added to the total period. From these accumulated values we are therefore able to derived the 'Positive Directional Index' (+DI) and 'Negative Directional Index' (-DI) which is used to calculate the Average Directional Index. Computation source: https://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:average_directional_index_adx More...

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

Public Member Functions

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

Public Attributes

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

Protected Member Functions

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

Properties

IndicatorBase< IndicatorDataPointPositiveDirectionalIndex [get]
 Gets the index of the Plus Directional Indicator More...
 
IndicatorBase< IndicatorDataPointNegativeDirectionalIndex [get]
 Gets the index of the Minus Directional 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 computes Average Directional Index which measures trend strength without regard to trend direction. Firstly, it calculates the Directional Movement and the True Range value, and then the values are accumulated and smoothed using a custom smoothing method proposed by Wilder. For an n period smoothing, 1/n of each period's value is added to the total period. From these accumulated values we are therefore able to derived the 'Positive Directional Index' (+DI) and 'Negative Directional Index' (-DI) which is used to calculate the Average Directional Index. Computation source: https://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:average_directional_index_adx

Definition at line 30 of file AverageDirectionalIndex.cs.

Constructor & Destructor Documentation

◆ AverageDirectionalIndex() [1/2]

QuantConnect.Indicators.AverageDirectionalIndex.AverageDirectionalIndex ( int  period)

Initializes a new instance of the AverageDirectionalIndex class.

Parameters
periodThe period.

Definition at line 72 of file AverageDirectionalIndex.cs.

◆ AverageDirectionalIndex() [2/2]

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

Initializes a new instance of the AverageDirectionalIndex class.

Parameters
nameThe name.
periodThe period.

Definition at line 82 of file AverageDirectionalIndex.cs.

Member Function Documentation

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.AverageDirectionalIndex.ComputeNextValue ( IBaseDataBar  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 224 of file AverageDirectionalIndex.cs.

◆ Reset()

override void QuantConnect.Indicators.AverageDirectionalIndex.Reset ( )

Resets this indicator to its initial state

Definition at line 249 of file AverageDirectionalIndex.cs.

Here is the caller graph for this function:

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.AverageDirectionalIndex.IsReady => _averageDirectionalIndex.IsReady

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

Definition at line 45 of file AverageDirectionalIndex.cs.

◆ WarmUpPeriod

int QuantConnect.Indicators.AverageDirectionalIndex.WarmUpPeriod => _period * 2

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

Definition at line 66 of file AverageDirectionalIndex.cs.

Property Documentation

◆ PositiveDirectionalIndex

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.AverageDirectionalIndex.PositiveDirectionalIndex
get

Gets the index of the Plus Directional Indicator

The index of the Plus Directional Indicator.

Definition at line 53 of file AverageDirectionalIndex.cs.

◆ NegativeDirectionalIndex

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.AverageDirectionalIndex.NegativeDirectionalIndex
get

Gets the index of the Minus Directional Indicator

The index of the Minus Directional Indicator.

Definition at line 61 of file AverageDirectionalIndex.cs.


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