Using the Heikin Ashi Indicator for Determining Market Trends

In this Indicator Spotlight, we’re looking at the Heikin Ashi indicator (sometimes spelled Heiken Ashi). The indicator is used for determining market trends, identifying short/long biases. Blue candles will show a rising trend, whereas magenta candles indicate a downtrend. To learn more, watch the video or continue reading below.

Dan Valcu’s Formula

Heikin Ashi charts are created the same way as a normal candlestick charts, but use modified bar formulas. Specifically, each candle is calculated and plotted using some data from the previous candle.

Dan Valcu Heikin Ashi Formula

The OHLC refers to the current bar and the ha-prefix corresponds to the modified Heikin Ashi values. The value haOpen equals the midpoint of the previous body range, and the haClose equals the average price of the current bar. The haHigh, is the highest value of real high (H), modified open (haOpen), and modified close (haClose). The same applies for the low definition, i.e. the lowest value of real low (L), modified open (haOpen), and modified close (haClose).

Heikin Ashi Interpretation

When the haClose is above haOpen, we will see a bullish output (blue candle). Conversely, if the haClose is below haOpen, we will see a bearish output (magenta candle).

Heikin-Ashi Trend Interpretation
Trend Interpretation

Strong up-trends are characterized by long blue bodies with minor lower shadows and conversely for down-trends with long magenta bodies with minor upper shadows. If the bodies decrease in size, one should anticipate a weaker trend. A period of consolidation will generally have several small bodies with both long upper and lower shadows. A very small body with tall shadows may be a warning about a possible change of trend.

Smoothed Heikin Ashi

In general, a Heikin Ashi chart will see a smoother output when compared to a traditional candlestick chart and the bars may then be further smoothed with one of over 30 different moving averages.

Smoothed Heikin-Ashi
Smoothed Heikin Ashi

The chart above applies the default SMA for smoothing, however it can easily be swapped for the EMA, ADXVMA, Laguerre etc. via the indicator dialogue box.

Primary Bars and Paint Bars

Although the above output looks straightforward and easy to trade, overlaying the primary bars with black for down closes and transparent for up closes shows a different picture.

Smoothed Heikin-Ashi with primary bars
Smoothed output with primary bars

It is of course important to be aware of the true price levels in order to understand what’s going on for setting appropriate risk and stop loss levels. A more useful application is therefore simply to use the Heikin Ashi paintbars to display the trend bias on the primary bars as displayed in the chart below.

Paintbars displayed on primary bars

The paintbars can be diplayed with all bar types. One may  for example display the trend via paintbars on range, volume or renko bars.

To download the library version of the Heikin Ashi indicator, please follow the link below:

The indicator is available for NinjaTrader 8.