Arte SheetsLearn. Try. Understand.

Quantitative Finance & Trading

Heikin-Ashi Candlestick Formula: Smoothed HA-OHLC Recursion & Wickless Trend Filter

Transform noisy raw OHLC price bars into Munehisa Homma’s smoothed Heikin-Ashi ("Average Bar") coordinates HA_Open, HA_High, HA_Low, HA_Close and detect pure wickless trend candles.

Filter whipsaw candlestick noise with recursive Heikin-Ashi OHLC!

Heikin-Ashi ("Average Bar" in Japanese) replaces raw Open/High/Low/Close with four smoothed series: (1) HA_Close_t = (O_t + H_t + L_t + C_t) / 4 (mean bar price), (2) recursive HA_Open_t = (HA_Open_{t-1} + HA_Close_{t-1}) / 2 (midpoint of the prior Heikin-Ashi body), (3) HA_High_t = MAX(H_t, HA_Open_t, HA_Close_t), and (4) HA_Low_t = MIN(L_t, HA_Open_t, HA_Close_t)!

Because HA_Open anchors inside the prior bar’s body, strong uptrends print green candles (HA_Close > HA_Open) with ZERO lower shadow (HA_Low = HA_Open), while strong downtrends print red candles with ZERO upper shadow (HA_High = HA_Open)!

Heikin-Ashi CoordinateExact Formula (O=102, H=110, L=100, C=108; Prev HAO=99, HAC=103)Evaluated Value
HA_Close(102 + 110 + 100 + 108) / 4105.00
HA_Open(99 + 103) / 2101.00 (Bullish body = +4.00)
HA_High & HA_LowMAX(110, 101, 105) & MIN(100, 101, 105)110.00 & 100.00 (Lower wick = 1.00)

Heikin-Ashi Average Bar Close (HA_Close)

Computes the four-price arithmetic mean (O + H + L + C) / 4 while verifying valid bar ordering L <= O,C <= H.

=IF(OR(B3 < B4, B2 < B4, B2 > B3, B5 < B4, B5 > B3), "Invalid Raw OHLC Ordering", ROUND((B2 + B3 + B4 + B5) / 4, 2))

Heikin-Ashi Lower Shadow Length (Zero = Pure Bullish Impulse)

Measures MIN(HA_Open, HA_Close) - MIN(Raw_Low, HA_Open, HA_Close); equals 0 whenever Raw_Low >= HA_Open in an uptrend.

=ROUND(MIN((B6 + B7) / 2, (B2 + B3 + B4 + B5) / 4) - MIN(B4, (B6 + B7) / 2, (B2 + B3 + B4 + B5) / 4), 2)

Try the example

Use the original values or change them to test your understanding.

Further reading