Skip to content

Heikin-Ashi Candlestick Function - HAC()

By Optuma Team · Updated 2022-11-30

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

Section titled “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

Section titled “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)

Choose which categories of cookies you allow. Strictly-necessary cookies are always on. You can change this any time via the "Cookie Settings" link in the footer.

  • Functional

    Remember preferences like dismissed banners and your dark-mode choice.

  • Analytics

    Help us understand how the site is used so we can improve it.

  • Marketing

    Measure our advertising and help us reach people who may be interested in Optuma.