Heikin Ashi Settings for MT4: 26 of 96 Smoothed Settings Made Money, 0 on EURUSD M5, and the First-Half Winner Ranked 19th of 24 on Gold

Key takeaways
- MetaTrader 4 and 5 both ship a Heiken Ashi indicator in Navigator, Indicators, Examples. It has no settings to tune. Tuning means a smoothed version, so I tested smoothing before and after the candles are built, on EURUSD and gold, M5 and M15.
- Smoothing before and smoothing after gave identical colours. With moving-average smoothing, 3 then 5 and 5 then 3 are the same setting, so my 120 combinations were 96 different ones.
- 26 of 96 settings made money after cost, 9 in both halves of the data, all 9 on M15. 0 of 24 made money on EURUSD M5.
- The best setting of the first half did not hold up. It ranked 5th, 13th, 7th and 19th of 24 in the second half. On gold M15 it went from +$4.76 an ounce per trade to -$1.05.
- Heavier smoothing cut the colour changes on EURUSD M5 from 81 a day to 20, and on EURUSD M15 and gold M5 every profitable setting used at least 8 bars of total smoothing.
This is the practical page: how to put Heikin Ashi on a MetaTrader chart so it is readable, what the smoothed versions change, and which settings held up on real data. The question of whether Heikin Ashi entries work at all is answered in Heikin Ashi strategy tested. The short version: not at the default, and never trust a backtest priced on Heikin Ashi candles.
How do you add Heikin Ashi to MT4?

- Open the Navigator with Ctrl+N.
- Expand Indicators, then Examples. MetaTrader spells it Heiken Ashi.
- Drag it onto the chart, or double-click it. In the window that opens, the only inputs are colours. Click OK.
- The Heikin Ashi candles are drawn on top of the normal candles, which makes a mess. Press F8, open the Colors tab, and set Bar Up, Bar Down, Bull candle and Bear candle to None. Or switch the chart to a line with Alt+3 and keep the close visible as a thin line.
- Save it as a template (right-click, Template, Save Template) so you do not repeat the steps on every chart. I set up a clean first chart step by step in MT4 first chart setup.
In MetaTrader 5 it is the same path: Navigator, Indicators, Examples, Heiken Ashi. MT5 draws it in its own style, so you hide the price bars from the chart properties (F8) the same way.
I prefer to keep the real close visible as a line. On my data the Heikin Ashi candle was a different colour from the real bar on 33% to 34% of bars, and its close was a median 0.19 to 0.30 ATR away from the real close. Your stop and your fill come from the real price.
What settings does Heikin Ashi have?

The standard indicator has none. Each candle is fixed by the formula: close = (open + high + low + close) / 4, open = midpoint of the previous Heikin Ashi candle. What people call “Heikin Ashi settings” belongs to the smoothed versions you download separately. They have two moving averages:
- The first smooths the open, high, low and close before the candles are built.
- The second smooths the Heikin Ashi open and close afterwards.
Each has a period and a type. I tested exponential averages with the first period at 1 (off), 2, 3, 5 and 10 and the second at 1 (off), 3 and 5, with two entries each: the colour change, and the second candle of the new colour.
The first thing the test showed: the order does not matter. Smoothing by 3 before and 5 after gave exactly the same candle colours as 5 before and 3 after, on every bar of every chart. Moving averages and the Heikin Ashi open are all linear averages of past prices, and linear averages can be applied in any order. So the real setting is the pair, not which box each number sits in. Of my 120 combinations, 96 were different. In the tables I write a setting as 3+5.
How were the settings tested?
- Data: EURUSD, June 3 to August 26, 2026, 16,926 M5 bars and 5,642 M15 bars; gold, June 16 to August 26, 13,736 M5 and 4,577 M15 bars.
- Entry at the real close of the signal bar.
- Exit: stop 1.5 ATR, target 3 ATR, 48 bars at most, one trade at a time.
- Cost: 1 pip on EURUSD, $0.30 an ounce on gold.
- Two checks for each setting: profit after cost, and profit in both halves of the data (split on July 15). Then a walk-forward test: pick the best setting on the first half and see where it lands in the second, the method from my in-sample and out-of-sample test.
Which Heikin Ashi settings made money?
| Chart | Settings | Made money | In both halves | Best setting | Best, per trade | Default colour change |
|---|---|---|---|---|---|---|
| EURUSD M5 | 24 | 0 | 0 | 5+5, colour change | -0.88 | -1.08 |
| EURUSD M15 | 24 | 5 | 2 | 5+5, second candle | +0.50 | -1.32 |
| Gold M5 | 24 | 7 | 0 | 3+10, colour change | +0.34 | -1.10 |
| Gold M15 | 24 | 14 | 7 | 2+3, second candle | +1.87 | +0.29 |
| All | 96 | 26 | 9 |
After cost, pips on EURUSD and dollars an ounce on gold. “Default” is the plain Heikin Ashi with no smoothing.
On EURUSD M5 nothing worked. The best of 24 settings still lost 0.88 pips a trade over 825 trades, and the default lost 1.08. Smoothing moved the result by a few tenths of a pip in either direction, which is less than the spread.
On EURUSD M15 and gold M5 smoothing helped. Every profitable setting there used at least 8 bars of total smoothing, such as 3+5 or 3+10, while the unsmoothed default lost 1.32 pips and $1.10. On gold M5, though, all 7 profitable settings lost money in one of the two halves.
Gold M15 was the friendliest chart: 14 of 24 settings made money and 7 did it in both halves. The best was 2+3 with the second-candle entry, +$1.87 an ounce per trade over 195 trades. That chart trended for much of the summer. On the same chart, random entries with this exit reached +$2.25 to +$2.43 in their best 5% of runs, so +$1.87 is not proof of anything on its own.
Does the best setting keep working?
This is the test that matters before you type a number into an indicator. I picked the best setting on the first half of the data, June to mid July, and checked where it ranked in the second half.
| Chart | Best in the 1st half | 1st half, per trade | 2nd half, per trade | Rank in the 2nd half |
|---|---|---|---|---|
| EURUSD M5 | 5+5, colour change | -0.59 | -1.16 | 5 of 24 |
| EURUSD M15 | 3+10, second candle | +1.55 | -1.10 | 13 of 24 |
| Gold M5 | 3+5, second candle | -0.68 | +0.58 | 7 of 24 |
| Gold M15 | 3+5, colour change | +4.76 | -1.05 | 19 of 24 |
On gold M15 the first-half winner made $4.76 an ounce per trade, then lost $1.05 in the second half and ranked 19th of 24. On EURUSD M15 the winner went from +1.55 pips to -1.10. A setting picked on past data was a middle-of-the-pack setting a month later. I found the same with optimised indicator settings in optimised vs default settings.
What does smoothing do to the chart?
| Colour changes per day | No smoothing | 1+3 | 1+5 | 3+5 | 5+5 | 5+10 |
|---|---|---|---|---|---|---|
| EURUSD M5 | 80.9 | 53.1 | 42.8 | 30.8 | 25.5 | 19.6 |
| EURUSD M15 | 25.5 | 17.4 | 14.5 | 10.1 | 8.6 | 6.4 |
| Gold M5 | 68.3 | 46.9 | 38.1 | 28.3 | 23.9 | 17.3 |
| Gold M15 | 21.9 | 14.4 | 11.6 | 8.7 | 7.4 | 5.8 |
Going from no smoothing to 5+10 cut the colour changes by about three quarters on every chart. A 5+10 chart on EURUSD M5 changes colour about once every 70 minutes instead of every 18. The cost is the same as with any moving average: the change comes later. If you want fewer, slower signals, a higher timeframe does the same job without a custom file, as I measured in moving average settings for MT4.
How do you backtest Heikin Ashi in MT4 without fooling yourself?
The illusion in Heikin Ashi backtests comes from filling trades at Heikin Ashi prices. On my data the same always-in system made money in 8 of 12 runs when scored on Heikin Ashi closes and in 0 of 12 on real closes.
- In the MT4 Strategy Tester an Expert Advisor reads Heikin Ashi with iCustom from the “Heiken Ashi” indicator. In the standard file, buffers 2 and 3 are the Heikin Ashi open and close. The orders still fill at the real Bid and Ask, so the tester is honest about price. How to run that test is in backtesting an EA in MT5.
- A spreadsheet or exported Heikin Ashi data is not honest. If the price column is the Heikin Ashi close, every trade starts at an averaged price nobody could trade.
- On charting platforms, check the fill setting. TradingView, for example, has an option to fill strategy orders on standard OHLC when the chart is Heikin Ashi. Leave it on.
- Read the signal on a closed bar only. The Heikin Ashi candle still forming changes until the bar closes.
What settings would I use?
- For reading the chart: the standard Heiken Ashi from Examples, with the normal candles hidden and the close shown as a line.
- Do not trade it on EURUSD M5. 0 of 24 settings made money there.
- If you want a smoothed version, think in total smoothing, not two separate boxes. 3 and 5 is the same as 5 and 3.
- Do not pick the setting that did best last month. First-half winners ranked 5th to 19th of 24 in the second half.
- Check any result against random entries with the same exit before trusting it. On gold M15, random entries reached +$2.25 in their best 5% of runs, above the best setting here.
How Heikin Ashi compares with plain candles under the same rules is in Heikin Ashi vs regular candlesticks.
Frequently asked questions
Where is Heikin Ashi in MT4?
Navigator (Ctrl+N), Indicators, Examples, Heiken Ashi. MetaTrader spells it with an e. The same path works in MT5.
What are the best Heikin Ashi settings?
No setting held up. 26 of 96 smoothed settings made money, 9 in both halves, all on M15, and the best setting of the first half ranked 5th to 19th of 24 in the second half.
What is Heikin Ashi Smoothed?
Heikin Ashi with a moving average applied to the prices before the candles are built and to the candles afterwards. With moving-average smoothing the order does not matter: 3 then 5 gave the same colours as 5 then 3.
How do I hide normal candles under Heikin Ashi in MT4?
Press F8, open the Colors tab and set Bar Up, Bar Down, Bull candle and Bear candle to None. Or switch to a line chart with Alt+3 to keep the real close visible.
Can I backtest a Heikin Ashi strategy in MT4?
Yes, with an Expert Advisor that reads the indicator through iCustom. Orders fill at real prices. Do not test it on Heikin Ashi prices: that turned 0 of 12 profitable runs into 8 of 12.
Want a trend indicator that is ready to use without tuning?
It is my own enhanced DeMARK Trend Line indicator for MetaTrader 4 and 5. Non repaint, clean, and free.

