Heikin Ashi Trading Strategy: Formula, Signals and the Backtest Trap (Free PDF) 2026年10月05日 – Posted in: Forex trading

BJF TRADING GROUP · TRADING STRATEGIES

Heikin Ashi Trading Strategy: Formula, Signals and the Backtest Trap

Heikin Ashi candles turn a noisy price chart into clean trend runs, which is why traders love them. They also hide the real price, which is why many Heikin Ashi strategies look brilliant in a backtest and lose money live. This guide explains the formula, how to read the candles, a practical trend-following template, and what our test on real BTCUSDT data showed. A free two-page PDF cheat sheet is included.

Free PDF: Heikin Ashi Cheat Sheet
Formulas, the five candle signals, strategy rules, pre-trade checklist and the backtest results from this article on two printable pages.

Download the PDF

What Heikin Ashi candles are

Heikin Ashi (Japanese for “average bar”) is a way of drawing candlesticks from averaged prices instead of raw ones. The technique comes from Japan and became popular with Western traders after Dan Valcu described it in a 2004 article for Technical Analysis of Stocks & Commodities. Today it is built into practically every charting platform.

A regular candle shows exactly what happened in one period: where price opened, how far it travelled and where it closed. A Heikin Ashi candle shows a smoothed version of the same period, blended with the previous candle. The result is a chart where trends appear as long runs of one colour and small counter-moves are absorbed.

That smoothing is both the strength and the weakness of the method:

  • Strength: trends are easier to see and to stay in, and a lot of noise disappears.
  • Weakness: the candles react later than price, and their open and close are not prices anyone actually traded at.

The Heikin Ashi formula

Each Heikin Ashi candle is calculated from the real open, high, low and close (OHLC) of the current bar and from the previous Heikin Ashi candle:

Value Formula What it means
HA Close (Open + High + Low + Close) / 4 Average price of the current bar
HA Open (previous HA Open + previous HA Close) / 2 Midpoint of the previous HA body; first bar: (Open + Close) / 2
HA High max(High, HA Open, HA Close) Highest of the real high and the HA body
HA Low min(Low, HA Open, HA Close) Lowest of the real low and the HA body

Because every HA Open depends on the previous HA candle, the whole series carries memory of past bars. If you calculate it yourself, start a few dozen bars before the period you analyse so the starting value no longer matters. In Python the calculation takes a few lines:

ha_close = (o + h + l + c) / 4
ha_open = [(o[0] + c[0]) / 2]
for i in range(1, len(c)):
    ha_open.append((ha_open[-1] + ha_close[i - 1]) / 2)
ha_high = np.maximum.reduce([h, ha_open, ha_close])
ha_low = np.minimum.reduce([l, ha_open, ha_close])

How to read Heikin Ashi candles

Heikin Ashi is read by colour, body size and wicks rather than by classic candlestick patterns. Five situations cover most of what you will see:

Schematic of five Heikin Ashi candle signals: strong uptrend, strong downtrend, indecision, possible turn and weakening trend
The five Heikin Ashi signals (schematic drawing, not price data).
  1. Strong uptrend: green candles with no lower wick. Buyers are in control; on our BTCUSDT daily data 49% of green Heikin Ashi candles had no lower wick at all.
  2. Strong downtrend: red candles with no upper wick.
  3. Indecision: small bodies with long wicks on both sides (Heikin Ashi “doji”). The trend is pausing; it may continue or turn.
  4. Possible turn: the first candle of the opposite colour after a long run. One candle is often noise, so many traders wait for a second one.
  5. Weakening trend: bodies get smaller and a wick appears on the “wrong” side (a lower wick in an uptrend). A signal to tighten the stop rather than to reverse.

Heikin Ashi vs regular candles on real data

To show the difference on a real market rather than a textbook drawing, we took 999 daily BTCUSDT candles from Binance (10 January 2024 to 4 October 2026) and calculated Heikin Ashi from them.

BTCUSDT daily chart: regular candles above and Heikin Ashi candles below for the same 90 days, showing fewer colour changes on Heikin Ashi
The same 90 days of BTCUSDT drawn with regular candles (top) and Heikin Ashi (bottom). Source: Binance daily data.
BTCUSDT daily, Jan 2024 to Oct 2026 Regular candles Heikin Ashi
Colour changes 512 239
Average run of same-colour candles 1.95 bars 4.16 bars
Longest run 8 bars 23 bars
Difference between HA close and real close – median 0.63%, 90th percentile 1.92%, max 8.0%

Heikin Ashi cut the number of colour changes by more than half and doubled the length of the average run. That is exactly why it helps you stay in a trend. The last row is the price you pay: on one day in ten the Heikin Ashi close was 1.9% or more away from where Bitcoin actually closed.

A Heikin Ashi trend-following strategy

Heikin Ashi works best as a trend tool on higher timeframes (4-hour, daily). The template below is a reasonable starting point to test and adapt, not a ready-made system or a recommendation:

  1. Trend filter: trade only in the direction of a slower measure built on real prices, for example price above or below its 50-period EMA, or the Heikin Ashi colour on the next higher timeframe.
  2. Entry: after a run of the opposite colour, wait for two consecutive Heikin Ashi candles of the new colour, ideally the second one without a wick against the trade.
  3. Stop loss: on the real chart, beyond the last swing low (long) or swing high (short). Never place stops on Heikin Ashi values; they are not tradable prices.
  4. Exit: the first candle of the opposite colour, or earlier if bodies shrink and wicks appear against the trend after a long run.
  5. Position size: risk a fixed share of the account per trade. Smoother candles do not reduce market risk.

Expect long losing streaks in sideways markets: when price chops, Heikin Ashi flips colour repeatedly and every flip costs fees and slippage. The trend filter exists to keep you out of those periods. Momentum-based entries are covered in more detail in our guide to impulse trading strategies.

The backtest trap: +3,796% that does not exist

The most common mistake with Heikin Ashi is testing a strategy on Heikin Ashi prices. Many charting tools do this by default when the chart type is set to Heikin Ashi: entries and exits are filled at the HA open or HA close. Those values are averages. Nobody could ever buy or sell there.

We tested the simple colour-change rules from the template above on the same BTCUSDT daily data in two ways: once with fills at the Heikin Ashi close (the naive way) and once realistically, at the next real open with a 0.1% fee per side.

Bar chart comparing naive Heikin Ashi backtest results filled at HA prices with realistic results filled at the next real open on BTCUSDT daily data
Same rules, same data, two ways of filling orders. BTCUSDT daily, Binance, Jan 2024 to Oct 2026; buy and hold over the period: +85%.
Rules (BTCUSDT daily) Entries Naive: fills at HA close Realistic: next real open, 0.1% fee
1 HA candle, long and short 239 +3,796% -16.5%
1 HA candle, long only 120 +841% +37.0%
2 HA candles, long and short 154 +51% -42.0%
2 HA candles, long only 77 +87% +17.6%

The naive backtest turns a losing system into a spectacular one. The reason is simple: the Heikin Ashi close lags the real close, so a signal that appears “at the close” of a green Heikin Ashi candle is filled in the backtest at a price below where the market really was. Every trade gets a small, impossible discount, and over hundreds of trades that adds up to thousands of percent. On 4-hour BTCUSDT data (April to October 2026) the effect was the same: +110% naive versus -40% realistic for the long-and-short version.

Two practical conclusions:

  • Use Heikin Ashi to generate signals, but run the backtest on the real chart and fill at the next real price.
  • Include fees and slippage. A strategy with 239 entries in under three years pays a fee roughly 478 times.

The same principle, that the backtest must use prices you could really have traded, applies to every strategy. We explain it in detail for fast strategies in why latency arbitrage backtests mislead.

Heikin Ashi in automated trading

In a trading robot Heikin Ashi is useful as a trend filter or state: “only open long positions while the 4-hour Heikin Ashi is green” is easy to code and removes many trades against the trend. It is a poor choice for anything that depends on the exact price or timing:

  • Not for latency arbitrage or HFT. These strategies live on raw ticks and millisecond differences between feeds; an averaged candle throws that information away. See how latency arbitrage works and our overview of high-frequency forex trading.
  • Not for stops and take-profits. Orders are executed at real prices; levels must be calculated from real prices.
  • Careful with the current bar. A closed Heikin Ashi candle does not change, but the forming one changes with every tick. Act on closed bars only.

If you are building or buying a robot, our guide to algorithmic and automated forex trading covers the infrastructure side, and non-arbitrage forex robots explains the risks of trend and grid systems.

Pre-trade checklist

  • Trend direction confirmed on a higher timeframe or by a real-price filter.
  • Two Heikin Ashi candles of the same colour, not just one.
  • Stop loss placed on the real chart; position size calculated from that stop.
  • The market is trending, not chopping in a range.
  • The strategy was backtested on real prices with fees and slippage.
Keep it next to your screen
The two-page Heikin Ashi Cheat Sheet (PDF) contains the formulas, candle signals, strategy template, checklist and the backtest table from this article.

Download the free PDF

FAQ

Is Heikin Ashi good for day trading?

It can be used on intraday charts, but the shorter the timeframe, the larger the share of fees and slippage in each trade and the more often the candles flip in noise. In our 4-hour test the simple colour-change system lost money after costs. Heikin Ashi tends to work better as a filter on 4-hour and daily charts than as a stand-alone scalping signal.

What is the best timeframe for Heikin Ashi?

There is no universal best, but trend-following with Heikin Ashi is usually more robust on 4-hour and daily charts. A common approach is to read the trend on the higher timeframe and time entries on the lower one.

Does Heikin Ashi repaint?

Closed candles do not change. The candle that is still forming changes with every tick, and because each HA Open depends on the previous candle, values calculated from a different starting bar can differ slightly at the beginning of the series. Use closed bars and enough history.

Can I backtest a Heikin Ashi strategy?

Yes, but generate signals from Heikin Ashi and fill orders at real prices (for example the next real open) with fees and slippage. Filling at Heikin Ashi prices inflates results dramatically, as the table above shows.

Heikin Ashi or Renko?

Both reduce noise. Renko ignores time and only draws a brick when price moves a fixed amount; Heikin Ashi keeps the time axis and averages each bar. Heikin Ashi is easier to combine with time-based indicators and multiple timeframes.

Where can I get a Heikin Ashi strategy PDF?

Download our free Heikin Ashi Cheat Sheet (PDF). It summarises this guide on two pages, including the real-data backtest.

Prefer strategies that do not depend on reading charts?

BJF Trading Group builds software for arbitrage and automated trading: from a free scanner of price gaps between crypto exchanges to SharpTrader, a multi-strategy trading platform for forex and crypto.

Free crypto arbitrage scanner
About SharpTrader

Data: Binance BTCUSDT daily candles, 10 January 2024 to 4 October 2026 (999 bars), and 4-hour candles, 22 April to 5 October 2026. Backtests are simplified illustrations without slippage modelling and are not a forecast of future results. Trading involves risk of loss.