Heikin-Ashi Candlestick Function - HAC()

Author: Optuma Team Last updated: Nov 30, 2022 23:56

Heikin-Ashi candles are a modified version of candlestick charts which were designed to allow for better identification and analysis of trends. When scanning for conditions based on Heikin-Ashi candle values (including in watchlist columns) you first need to use the HAC() function to convert the data to Heikin-Ashi values (Note: this is not the case for Show Bar - see below).

To show the RSI(14) values of H-A candles in a watchlist use the following:

//Set data to Heikin-Ashi
V1=HAC();

//Calc RSI of H-A values by nesting V1 in the RSI function;
RSI(V1,BARS=14)

This is how they compare to the RSI on a regular candlestick chart:

Capture

Moving Average Cross Scan on Heikin-Ashi Values

//Set data to Heikin-Ashi
V1=HAC();

//Calc MA(20) of H-A values by nesting V1 in the MA function;
MA20=MA(V1, BARS=20, CALC=Close);

//Does H-A Close Cross Above H-A MA20)
CLOSE(V1) CrossesAbove MA20

Moving Average Cross Show Bar on Heikin-Ashi chart

If applying a Show Bar formula to a chart that has already been converted to Heikin-Ashi candles then the HAC() function should not be used - simply use the same formula that you would on a regular candlestick chart:

CLOSE() CrossesAbove MA(BARS=20, CALC=Close)