Calculating Heikin-Ashi Close and Open Values
Heikin-Ashi (HA) candles smooth price action by using modified formulas for each candle’s open, high, low, and close. This lesson focuses on how to calculate the HA close and open values, which form the foundation for the candle’s body and subsequent analysis.
The HA close equals the average of four prices from the current bar: open, high, low, and close. The formula reads:
[ HA_{close} = \frac{Open + High + Low + Close}{4} ]_
For example, consider ES futures trading on a 5-minute chart. Suppose the current 5-minute bar has:
- Open: 4150.00
- High: 4160.50
- Low: 4148.75
- Close: 4158.25
The HA close calculates as:
[ \frac{4150.00 + 4160.50 + 4148.75 + 4158.25}{4} = \frac{16617.50}{4} = 4154.375 ]
This 4154.375 becomes the HA close for that bar.
The HA open uses the previous bar’s HA open and HA close values:
[ HA_{open} = \frac{HA_{open_{prev}} + HA_{close_{prev}}}{2} ]_
If the previous HA open equals 4148.00 and the previous HA close equals 4149.50, the current HA open calculates as:
[ \frac{4148.00 + 4149.50}{2} = 4148.75 ]
This formula smooths the open price, reducing noise and creating a more stable trend visualization.
Calculating Heikin-Ashi High and Low Values
After calculating the HA open and close, determine the HA high and low for the candle. The HA high equals the highest value among the current bar’s high, HA open, and HA close:
[ HA_{high} = \max(High, HA_{open}, HA_{close}) ]_
Similarly, the HA low equals the lowest value among the current bar’s low, HA open, and HA close:
[ HA_{low} = \min(Low, HA_{open}, HA_{close}) ]_
Using the previous ES example with:
- High: 4160.50
- Low: 4148.75
- HA open: 4148.75
- HA close: 4154.375
Calculate:
[ HA_{high} = \max(4160.50, 4148.75, 4154.375) = 4160.50 ]_
[ HA_{low} = \min(4148.75, 4148.75, 4154.375) = 4148.75 ]_
These values form the candle’s wicks and provide insight into price extremes relative to the smoothed open and close.
Worked Trade Example Using Heikin-Ashi on TSLA
TSLA’s 15-minute chart shows a clear uptrend using HA candles. The current HA candle opens at 720.50, closes at 728.25, with a high of 730.00 and low of 719.00. The previous HA candle closed at 715.00 and opened at 712.00.
Calculate the HA open for the current candle:
[ \frac{712.00 + 715.00}{2} = 713.50 ]
The HA close uses current raw prices:
- Open: 718.00
- High: 730.00
- Low: 717.50
- Close: 728.25
[ \frac{718.00 + 730.00 + 717.50 + 728.25}{4} = \frac{2893.75}{4} = 723.44 ]
HA high:
[ \max(730.00, 713.50, 723.44) = 730.00 ]
HA low:
[ \min(717.50, 713.50, 723.44) = 713.50 ]
This candle’s body spans 713.50 to 723.44 with a wick up to 730.00.
Trade Setup
Entry: Enter long at 724.00 after a bullish HA candle closes above the previous HA close (715.00).
Stop-loss: Place stop 10 points below entry at 714.00, just below the HA low of 713.50.
Target: Aim for 740.00, near the previous resistance level on the raw price chart.
Risk: $10 per share.
Reward: $16 per share.
Risk-to-Reward Ratio (R:R): 1:1.6.
This trade uses HA candles to confirm trend strength and smooth noise, increasing confidence in the entry.
When Heikin-Ashi Calculations Work and When They Fail
Heikin-Ashi calculations excel in trending markets. The smoothing effect filters out minor retracements and consolidations. For example, on the NQ futures during a strong 3% rally, HA candles show consecutive green bodies with small or no lower wicks, signaling sustained buying pressure. Traders can hold positions longer and avoid premature exits.
HA candles struggle during choppy or range-bound markets. In SPY options trading, sideways price action creates alternating HA candle colors with small bodies and long wicks. The smoothing delays signals, causing late entries and exits. False breakouts appear more frequently due to the averaging process.
HA candles also mask gaps and sudden price spikes. For example, AAPL earnings releases cause sharp jumps or drops. HA candles smooth these into moderate moves, reducing the ability to react quickly to news-driven volatility.
Traders should combine HA candles with volume, momentum indicators, or price action analysis to confirm signals. Use HA candles as a trend filter rather than a standalone entry signal. Adjust stop-loss placement wider than usual to accommodate smoothing lag, especially in volatile instruments like CL crude oil futures or GC gold futures.
Practical Tips for Implementing Heikin-Ashi Calculations
-
Calculate HA values on the same timeframe as your strategy. For day trading ES or NQ, 1-minute or 5-minute charts work best. For swing trading AAPL or TSLA, use 30-minute or daily charts.
-
Use HA candles to identify trend direction and strength. Long green bodies with no lower wick indicate strong uptrend. Long red bodies with no upper wick indicate strong downtrend.
-
Avoid trading solely on HA candle color changes. Confirm reversals with volume spikes or momentum divergence.
-
Adjust stop-loss levels to account for HA smoothing. Place stops beyond recent HA highs or lows rather than raw price extremes.
-
Backtest HA-based strategies on tickers like ES, NQ, SPY, AAPL, TSLA, CL, and GC to measure performance across different volatility regimes.
Key Takeaways
-
Heikin-Ashi close equals the average of open, high, low, and close; open equals the midpoint of the previous HA open and close.
-
HA high and low equal the maximum and minimum of the current bar’s high/low and HA open/close.
-
HA candles smooth price data, improving trend clarity but lagging during rapid price changes.
-
Use HA candles to confirm trends and filter noise; combine with other indicators for entries and exits.
-
Adjust stop-loss placement to account for smoothing and backtest HA strategies on multiple tickers and timeframes.
