Class HeikinAshi
- Namespace
- FinanceSharp.Indicators
- Assembly
- FinanceSharp.dll
This indicator computes the Heikin-Ashi bar (HA) The Heikin-Ashi bar is calculated using the following formulas: HA_Close[0] = (Open[0] + High[0] + Low[0] + Close[0]) / 4 HA_Open[0] = (HA_Open[1] + HA_Close[1]) / 2 HA_High[0] = MAX(High[0], HA_Open[0], HA_Close[0]) HA_Low[0] = MIN(Low[0], HA_Open[0], HA_Close[0])
public class HeikinAshi : BarIndicator, IIndicator, IUpdatable
- Inheritance
-
HeikinAshi
- Implements
- Inherited Members
- Extension Methods
Constructors
HeikinAshi()
Initializes a new instance of the HeikinAshi class.
public HeikinAshi()
HeikinAshi(string)
Initializes a new instance of the HeikinAshi class using the specified name.
public HeikinAshi(string name)
Parameters
namestringThe name of this indicator
Properties
Close
Gets the Heikin-Ashi Close
public double Close { get; }
Property Value
CurrentBar
Gets the Heikin-Ashi current TradeBar
public TradeBarValue CurrentBar { get; }
Property Value
High
Gets the Heikin-Ashi High
public double High { get; }
Property Value
IsReady
Gets a flag indicating when this indicator is ready and fully initialized
public override bool IsReady { get; }
Property Value
Low
Gets the Heikin-Ashi Low
public double Low { get; }
Property Value
Open
Gets the Heikin-Ashi Open
public double Open { get; }
Property Value
Volume
Gets the Heikin-Ashi Volume
public double Volume { get; }
Property Value
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