How Heikin Ashi candles are calculated
Four formulas turn an ordinary candle into a Heikin Ashi candle. The close averages the four prices of the period, and the open is the middle of the previous Heikin Ashi body.
- Level 8 Advanced Charting
- Lesson 2 of 19
- 6 min read
- 2 questions
A Heikin Ashi candle is calculated from two things: the four prices of the ordinary candle for the same period, and the Heikin Ashi candle before it. The close is the average of the period’s open, high, low and close. The open is the midpoint of the previous Heikin Ashi candle’s body. The high and the low are the real high and low, unless the new open or close lies beyond them.
The four formulas
| Heikin Ashi value | Formula |
|---|---|
| Close | (open + high + low + close) ÷ 4 |
| Open | (previous Heikin Ashi open + previous Heikin Ashi close) ÷ 2 |
| High | The highest of: the high, the Heikin Ashi open, the Heikin Ashi close |
| Low | The lowest of: the low, the Heikin Ashi open, the Heikin Ashi close |
The open, high, low and close inside the formulas are those of the ordinary candle.
One candle by hand
The second day of the example chart opened at 1.0936, reached a high of 1.0938 and a low of 1.0918, and closed at 1.0924. The Heikin Ashi candle of the day before opened at 1.0944 and closed at 1.0942.
- Close = (1.0936 + 1.0938 + 1.0918 + 1.0924) ÷ 4 = 1.0929
- Open = (1.0944 + 1.0942) ÷ 2 = 1.0943
- High = the highest of 1.0938, 1.0943 and 1.0929 = 1.0943
- Low = the lowest of 1.0918, 1.0943 and 1.0929 = 1.0918
The market closed that day at 1.0924. The Heikin Ashi candle closes at 1.0929, five pips away, and opens at 1.0943, seven pips from the real open. Its high is its own open, so it has no upper wick, although the ordinary candle has one.
The first candle
The open needs a previous Heikin Ashi candle, and the first candle on a chart has none. A common starting rule is to use the average of the first candle’s own open and close. The first day of the example opened at 1.0952 and closed at 1.0936, so the chart starts with a Heikin Ashi open of 1.0944.
Platforms do not all start the same way, and they load different amounts of history. The effect fades fast, because each new open takes half of its value from the open before it. Starting this chart from the first day’s real open, 1.0952, changes the first Heikin Ashi open by 8 pips. The difference then halves with every candle.
| Candle | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| Difference in the Heikin Ashi open, in pips | 8 | 4 | 2 | 1 | 0.5 | 0.25 |
From the eighth candle it is under a tenth of a pip. Two platforms can show different Heikin Ashi candles at the left edge of a chart and the same ones everywhere else.
What follows from the formulas
- Every open lies inside the previous body. The midpoint of a body cannot be outside it, so a Heikin Ashi chart never shows a gap.
- The close leans towards the middle of the candle. Averaging the four prices pulls the close away from the real closing price, towards the centre of the day’s range.
- Each candle carries the past. The open depends on the previous open, which depends on the one before. That chain is the smoothing, and it is also the delay.
Key points
- Heikin Ashi close = (open + high + low + close) ÷ 4, using the ordinary candle of the same period.
- Heikin Ashi open = the midpoint of the previous Heikin Ashi candle’s body.
- The high and low are the real ones unless the Heikin Ashi open or close lies beyond them.
- Platforms may start the first candle differently. The difference halves with each candle.
Quick check
These questions do not count towards your quiz score.
Common mistakes
- Using the ordinary open in the open formula. The Heikin Ashi open comes from the previous Heikin Ashi candle. The market’s opening price is not in it.
- Forgetting that the high and low can change. When the averaged open lies above the real high, the open becomes the high and the upper wick vanishes.
- Comparing two platforms at the left edge of a chart. The first candles depend on how each platform starts the series.
- Rebuilding candles from the wrong time frame. A daily Heikin Ashi candle comes from daily candles. It cannot be made by averaging hourly Heikin Ashi candles.
Another example
On USD/JPY the previous Heikin Ashi candle opened at 150.20 and closed at 150.60. The new hour opens at 150.58, reaches a high of 150.92 and a low of 150.50, and closes at 150.84. The Heikin Ashi close is 602.84 divided by 4, which is 150.71. The open is the midpoint of the previous body, 150.40. The high is the real high, 150.92. The low is the open, 150.40, because the real low of 150.50 was above it. The candle is green with no lower wick, and its close is 13 pips below the real close.
Questions people ask
What is the formula for Heikin Ashi?
The close is the average of the period’s open, high, low and close. The open is the average of the previous Heikin Ashi open and close. The high is the highest of the real high and those two values, and the low is the lowest of the real low and those two values.
Why is the Heikin Ashi price different from the real price?
Because every Heikin Ashi value is an average. The close mixes the open, high and low into the closing price, and the open comes from the previous candle. On a rising candle the Heikin Ashi close usually sits below the real close, and on a falling candle above it.
Why do Heikin Ashi candles look different on different platforms?
There are two usual causes. Platforms may start the first candle in different ways and load different amounts of history, which affects the first few candles only. And two brokers’ ordinary candles can differ, as Level 2 explained, which carries through to the averages.
How is the first Heikin Ashi candle calculated?
It has no previous candle to take its open from, so a starting value is needed. A common rule uses the average of the first candle’s own open and close. Other starting rules exist, and the difference between them halves with each candle that follows.
Lessons are free to read without an account. Sign in and PipCircle remembers where you stopped, keeps your quiz scores and awards your badges. Sign in free
Trading foreign exchange and CFDs carries a high risk of losing money. PipCircle Learn is education and is not investment advice.