Class AverageDirectionalIndex
- Namespace
- FinanceSharp.Indicators
- Assembly
- FinanceSharp.dll
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
public class AverageDirectionalIndex : BarIndicator, IIndicator, IUpdatable
- Inheritance
-
AverageDirectionalIndex
- Implements
- Inherited Members
- Extension Methods
Constructors
AverageDirectionalIndex(int)
Initializes a new instance of the AverageDirectionalIndex class.
public AverageDirectionalIndex(int period)
Parameters
periodintThe period.
AverageDirectionalIndex(string, int)
Initializes a new instance of the AverageDirectionalIndex class.
public AverageDirectionalIndex(string name, int period)
Parameters
Properties
IsReady
Gets a flag indicating when this indicator is ready and fully initialized
public override bool IsReady { get; }
Property Value
NegativeDirectionalIndex
Gets the index of the Minus Directional Indicator
public IndicatorBase NegativeDirectionalIndex { get; }
Property Value
- IndicatorBase
The index of the Minus Directional Indicator.
PositiveDirectionalIndex
Gets the index of the Plus Directional Indicator
public IndicatorBase PositiveDirectionalIndex { get; }
Property Value
- IndicatorBase
The index of the Plus Directional Indicator.
WarmUpPeriod
Required period, in data points, for the indicator to be ready and fully initialized.
public override int WarmUpPeriod { get; }
Property Value
Methods
Forward(long, DoubleArray)
Computes the next value of this indicator from the given state
protected override DoubleArray Forward(long time, DoubleArray input)
Parameters
timelonginputDoubleArrayThe input given to the indicator
Returns
- DoubleArray
A new value for this indicator
Reset()
Resets this indicator to its initial state
public override void Reset()