Lean  $LEAN_TAG$
QuantConnect.Indicators.HeikinAshi Class Reference

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]) More...

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

Public Member Functions

 HeikinAshi (string name)
 Initializes a new instance of the HeikinAshi class using the specified name. More...
 
 HeikinAshi ()
 Initializes a new instance of the HeikinAshi class. More...
 
override void Reset ()
 Resets this indicator to its initial state More...
 

Public Attributes

override bool IsReady => Samples > 1
 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 (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< IndicatorDataPointOpen [get]
 Gets the Heikin-Ashi Open More...
 
IndicatorBase< IndicatorDataPointHigh [get]
 Gets the Heikin-Ashi High More...
 
IndicatorBase< IndicatorDataPointLow [get]
 Gets the Heikin-Ashi Low More...
 
IndicatorBase< IndicatorDataPointClose [get]
 Gets the Heikin-Ashi Close More...
 
IndicatorBase< IndicatorDataPointVolume [get]
 Gets the Heikin-Ashi Volume 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 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])

Definition at line 29 of file HeikinAshi.cs.

Constructor & Destructor Documentation

◆ HeikinAshi() [1/2]

QuantConnect.Indicators.HeikinAshi.HeikinAshi ( string  name)

Initializes a new instance of the HeikinAshi class using the specified name.

Parameters
nameThe name of this indicator

Definition at line 60 of file HeikinAshi.cs.

◆ HeikinAshi() [2/2]

QuantConnect.Indicators.HeikinAshi.HeikinAshi ( )

Initializes a new instance of the HeikinAshi class.


Definition at line 73 of file HeikinAshi.cs.

Member Function Documentation

◆ ComputeNextValue()

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

◆ Reset()

override void QuantConnect.Indicators.HeikinAshi.Reset ( )

Resets this indicator to its initial state

Definition at line 127 of file HeikinAshi.cs.

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.HeikinAshi.IsReady => Samples > 1

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

Definition at line 81 of file HeikinAshi.cs.

◆ WarmUpPeriod

int QuantConnect.Indicators.HeikinAshi.WarmUpPeriod => 2

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

Definition at line 86 of file HeikinAshi.cs.

Property Documentation

◆ Open

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.HeikinAshi.Open
get

Gets the Heikin-Ashi Open

Definition at line 34 of file HeikinAshi.cs.

◆ High

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.HeikinAshi.High
get

Gets the Heikin-Ashi High

Definition at line 39 of file HeikinAshi.cs.

◆ Low

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.HeikinAshi.Low
get

Gets the Heikin-Ashi Low

Definition at line 44 of file HeikinAshi.cs.

◆ Close

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.HeikinAshi.Close
get

Gets the Heikin-Ashi Close

Definition at line 49 of file HeikinAshi.cs.

◆ Volume

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.HeikinAshi.Volume
get

Gets the Heikin-Ashi Volume

Definition at line 54 of file HeikinAshi.cs.


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