People love Heikin-Ashi for its calm: the smoothed candles remove the noise and the trend is visible at once, a run of greens or a run of reds. I ran the classic Heikin-Ashi rules on seven markets over 72 months and found a version that passed the most important test: two years of data the optimizer never saw. It’s a robot for gold on H4. I’ll show you what it did, what its trades look like, where its risks are, and how to download it for free.
- +96% in 72 months on GOLD H4, risking 1% per trade. Maximum drawdown: 13.8%.
- +54% in the forward test (10/2024–09/2026) with a profit factor of 1.71: the robot made money on data it didn’t see during tuning.
- Risking 2% per trade, the same robot returned +293% in 72 months with a 26% drawdown.
- In the file: the robot for MetaTrader 5, the .set for GOLD H4, and the instructions. It takes 5 minutes to get running.
📊 Download the free robot on Telegram

What the robot does
Heikin-Ashi candles come from Japan, and in the West they were popularized by Dan Valcu with his article “Using The Heikin-Ashi Technique” (Technical Analysis of Stocks & Commodities magazine, 2004) and his book “Heikin-Ashi: How to Trade Without Candlestick Patterns.” Each candle is built from averaged prices: the close is the average of the open, high, low, and close, and the open is the midpoint of the previous candle. That’s why the color changes rarely, and only when the move has truly turned. The robot works like this:
- Entry: on H4, after a series of red Heikin-Ashi candles the first green one appears, and the regular price closed above the EMA 150. The robot buys at the open of the next candle. There are no sells: only buys, in line with gold’s main move.
- Stop: 1.5 ATR(14) from the entry price.
- Take profit: three stops. If the Heikin-Ashi candle turns red before that, the robot exits on the color change, without waiting for the stop.
- Position size: based on risk as a % of balance. In the test, 1%; in the parameters you can set your own.
It’s a trend robot with a short memory: it buys the pullback inside an uptrending market right when the smoothed candles show that the pullback is over. It wins only 37% of its trades, but the average winner is about 2.5 times larger than the average loser, and that’s where the result comes from.
What it looks like on the chart
Below are two real trades by the robot in the GOLD H4 test. Both are from the forward period, which the optimizer didn’t see: one winner and one loser, so you can see the robot as it is. The charts show the Heikin-Ashi candles, as the robot sees them, and the EMA 150 line.

Winning trade. In early December 2025 gold pulled back for two days, the Heikin-Ashi candles were red, but the price stayed well above the EMA 150. On December 11 a four-hour Heikin-Ashi candle turned green: the pullback was over. The robot bought at the open of the next candle, at 4221.16, with a stop at 4184.99 (1.5 ATR) and a take profit at 4329.66. The next day gold reached the target: +$434.

Losing trade. On October 9, 2025, the same picture: a short pullback in the middle of a rally and the first green candle above the EMA 150. The robot bought at 4038.21, with a stop at 3996.93 and a take profit at 4162.05. But within a few hours gold fell hard and hit the stop: −$165. The system can’t know in advance which pullback ends and which one gets deeper. Here the stop is the price of getting into the moves that later pay a take profit three times larger.
By hand: put the gold chart on H4 and choose Heikin-Ashi candles (in MetaTrader 5 it’s the Heiken Ashi indicator from the standard set; in TradingView, it’s a chart type). Add an EMA 150 on the close. Buy when, after red Heikin-Ashi candles, the first green one appears and the price is above the EMA 150. Stop at 1.5 ATR(14) below the entry; take profit at three times the stop distance. If the Heikin-Ashi candle turns red again before the take profit, exit.
Robot results: training and forward
To avoid fooling myself with overfitting, I split the history into two parts. The parameters are chosen using only 10/2020–09/2024. Then the robot takes the exam on 10/2024–09/2026, months the optimizer didn’t see. The test: MetaTrader 5 strategy tester, FxPro demo account with its quotes, spreads, commissions, and swaps, $10,000 deposit, 1:500 leverage, “1 minute OHLC” mode.

| Period (GOLD H4) | Return | Profit factor | Max. drawdown | Trades |
|---|---|---|---|---|
| Training, 10/2020–09/2024 | +25.3% | 1.21 | 13.8% | 408 |
| Forward, 10/2024–09/2026 | +54.4% | 1.71 | 6.1% | 230 |
| All 72 months, 1% risk | +96.4% | 1.44 | 13.8% | 638 |
| All 72 months, 2% risk | +293.1% | 1.47 | 26.0% | 638 |
The most important thing here is the forward test. On unknown data, the robot earned twice as much as in the four years of training, and the profit factor rose from 1.21 to 1.71. I’ll tell you frankly where that jump comes from: in the two forward years gold rose enormously, and the robot buys pullbacks in an uptrending market. What matters most to me is stability: the 62 profitable parameter sets in training stayed positive in the forward test, and neighboring settings (EMA 100–200, stop of 1–3.5 ATR, take profit of 2–4 stops) also make money. In other words, the robot doesn’t depend on a single lucky number. Over 72 months, commissions took $244, and the swaps on gold buys at FxPro added up to $2,277: that’s the cost of the robot sometimes holding a position for several days.

📊 Download the robot and the parameters for GOLD H4
Why the “internet” Heikin-Ashi doesn’t work and this one does
First I ran Heikin-Ashi the way it’s usually recommended: daily chart, entry after two candles of the new color with no shadow against the move, buys and sells, exit on a color change. Seven markets, 72 months:

| Instrument (D1) | Result | Profit factor | Max. drawdown | Trades |
|---|---|---|---|---|
| BITCOIN | +11.3% | 1.23 | 11.2% | 224 |
| EURUSD | −1.9% | 0.95 | 10.6% | 158 |
| GOLD | −1.9% | 0.94 | 14.4% | 121 |
| WTI (oil) | −7.7% | 0.73 | 10.9% | 133 |
| GBPUSD | −8.2% | 0.76 | 12.0% | 155 |
| USDJPY | −16.4% | 0.64 | 19.0% | 175 |
| USDCHF | −16.4% | 0.61 | 20.3% | 155 |
Positive only on bitcoin; losses in six markets out of seven. Even on gold, which doubled in price over these years, the classic version couldn’t make money. There are three reasons:
- Heikin-Ashi candles arrive late. By the time two candles of the new color with no shadow appear, the best part of the move has already passed, and the exit on a color change gives another piece back to the market.
- Sells against the main move eat what the buys earn. Gold was rising and the classic version sold every pullback.
- There’s no trend filter and no take profit. In a range the candles change color every few days, and every change is a new trade with a commission and a stop.
The robot that works differs in exactly that: H4 instead of D1, entry on the first candle of the new color, only buys above the EMA 150, and a take profit of three stops. The Heikin-Ashi candles were left as the author defined them. On USDJPY H4 and on bitcoin, a setup like this didn’t pass the forward test: of the sets that were profitable in training, only half stayed positive on new data. That’s why the robot is configured only for GOLD H4, and I don’t recommend moving it to other markets without your own test.
The risks, with no makeup
- The robot only buys gold. The forward period coincided with a very strong rally in gold. In a long decline or a wide range, the robot will hit the stop more often, and the EMA 150 filter will let it enter less.
- Losing streaks are normal. It wins 37% of its trades, so 6–8 stops in a row are a regular part of the job. Choose a risk level you can sit through calmly: 0.5–1%.
- A 2% risk also doubles the drawdown: 26% instead of 13.8%. That’s already a hole you can feel; I would start with 1%.
- Swaps on gold buys are negative. In the test they took $2,277 over six years; with your broker the figure may be different.
Where to run the robot
The robot works in MetaTrader 5 with any broker that offers gold (XAUUSD / GOLD). My test was done at FxPro. The other brokers in my ranking also work: RoboForex and Tickmill. Before putting it on your account, run it in your broker’s tester: it takes an afternoon and shows you how it behaves with your quotes and your swaps. To have it work without interruptions, leave the platform on a VPS: the robot needs to see the close of every H4 candle.
Download the Heikin-Ashi robot for free
The robot is free for clients of the brokers in my ranking:
- Open a MetaTrader 5 account with one of the brokers above (or use the one you already have).
- Go to the Telegram bot with the button and send your account number.
- After verification, the bot sends you the file: the robot, the parameters for GOLD H4, the classic Heikin-Ashi parameters for your own experiments, and the instructions.
📊 Download the free robot on Telegram
My conclusion
Heikin-Ashi in its classic form is a pretty picture, not a system: on the daily chart it arrives late and loses in six markets out of seven. But the smoothed candles answer one question well: is the pullback over yet? If you ask it only in an uptrending market, on H4, and with a clear take profit, you get a robot that doubled the deposit in 72 months with a 13.8% drawdown, and that earned more in two unknown years than in four years of training. The forward test confirmed it, and all the neighboring settings behaved the same way; that’s why I trust this robot. Protect your deposit: start on demo and with a small risk.
Today I also published the analysis of the double top and double bottom: there the famous pattern didn’t produce a reliable robot, and I explain what to use instead. The Supertrend on USDJPY, the Williams volatility breakout, and Elder’s Triple Screen also passed the test. Other analyses: Keltner channel and Ichimoku.
Why 72 months?
The market changes fundamentally every 3–5 years: the participants and the volatility change, and trends give way to ranges. Gold is the best example. Until 2024 it spent years in a wide range, and trend systems barely made anything: in training our robot earned only 25% in four years. Then central banks started buying the metal by the ton and the market became a different one: the same logic gave 54% in two years. A 10–20 year test would have blended those eras into a single average figure. A strategy should be chosen for the current market, and changed when the market changes; that applies to this robot too.
That’s why I made my app “Find your strategy”, in the browser or on Telegram. There you can test any idea on up to 72 months of history, and every 2 weeks the app automatically runs tens of thousands of strategies and shows you the ones that work over the last 6, 12, and 36 months. It doesn’t promise profits: it helps you notice in time that the market has changed.
Backtest results do not guarantee future results.
Sources
- Dan Valcu: “Using The Heikin-Ashi Technique,” Technical Analysis of Stocks & Commodities, 2004; book “Heikin-Ashi: How to Trade Without Candlestick Patterns.”
- Own tests in MetaTrader 5 on the FxPro demo server, October 2026.
Where to trade
These are the brokers and exchanges I use that work with clients from Latin America. Always check that the service is available in your country and start small.
Risk warning: CFDs, Forex, and crypto derivatives carry a high risk of losing money due to leverage. This article is not investment advice.



