NinjaScript > Language Reference > Indicator Methods >

Heiken-Ashi

Print this Topic Previous pageReturn to chapter overviewNext page

Description

Heiken-Ashi is an averaging technique used in conjunction with candlestick bars primarily for identifying when markets are trending.

 

 

Syntax

HeikenAshi()
HeikenAshi(IDataSeries input)

 

Returns Heiken-Ashi open value
HeikenAshi().HAOpen[int barsAgo]
HeikenAshi(IDataSeries input)[int barsAgo]

 

Returns Heiken-Ashi high value
HeikenAshi().HAHigh[int barsAgo]
HeikenAshi(IDataSeries input)[int barsAgo]

 

Returns Heiken-Ashi low value
HeikenAshi().HALow[int barsAgo]
HeikenAshi(IDataSeries input)[int barsAgo]

 

Returns Heiken-Ashi close value
HeikenAshi().HAClose[int barsAgo]
HeikenAshi(IDataSeries input)[int barsAgo]

 

 

Return Value

double; Accessing this method via an index value [int barsAgo] returns the indicator value of the referenced bar.

 

 

Parameters

input

Indicator source data (?)

 

 

Examples

// Prints the current HA open value
double value = HeikenAshi().HAOpen[0];
Print("The current Heiken-Ashi open value is " + value.ToString());

 

// Prints the current HA close value
double value = HeikenAshi().HAClose[0];
Print("The current Heiken-Ashi close value is " + value.ToString());

 

 

Source Code

You can view this indicator method source code by selecting the menu Tools > Edit NinjaScript > Indicator within the NinjaTrader Control Center window.