Strategies

Wilder’s DMI Robot for MT5: +220% on Gold in 72 Months

Anton Rozhnovsky · November 12, 2026 · 12 min read
Wilder's DMI Robot for MT5: +220% on Gold in 72 Months

The DMI (Directional Movement Index) was created by J. Welles Wilder, the same author who gave traders the RSI, the ATR and the Parabolic SAR. Its rule is simple: if the +DI line crosses above the −DI, buy; if it goes the other way, sell. I tested the classic version on seven markets over 72 months, and six of them ended negative or close to zero. But on gold the idea holds up: if you move it to H4 and add a trend filter, you get a robot that tripled the deposit in six years and made money in two years the optimizer never saw. Below are its results, real trades on the chart and how to download it for free.

📊 Download Wilder’s DMI robot for free

Wilder's DMI robot for MetaTrader 5: an honest 72-month test on gold (GOLD) H4

What the robot does

Wilder described the directional movement system in his book “New Concepts in Technical Trading Systems” (1978). He compared each candle with the previous one: if the high rose above the previous high by more than the low fell below the previous low, it counts as upward movement (+DM); otherwise, as downward movement (−DM). Smoothed and divided by the true range, they give two lines: +DI, the strength of the buyers, and −DI, the strength of the sellers. The third line, the ADX, shows whether there is a trend. The robot keeps Wilder’s idea, trading the crossover of +DI and −DI, and changes what got in the way in the historical data:

39% of trades close in profit. The rest are small stops or early exits on the opposite crossover, and one winning trade that hits its take profit covers three stops. The result rests on that asymmetry.

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 did not see: one winner and one loser. At the bottom are +DI 7 (green) and −DI 7 (red); the yellow circle marks the crossover. The yellow line on the price chart is the 200 EMA, the trend filter.

Example of a winning trade by Wilder's DMI robot: gold H4, −DI above +DI, exit at take profit

Winning trade. On June 9, 2026, gold was below the 200 EMA, and after a brief pause the −DI rose back above the +DI. The robot sold at 4252.08, with a stop at 4325.31 and a take profit at 4032.40, three times farther than the stop. Two days later, on June 11, the price hit the take profit: +$879.

Example of a losing trade by Wilder's DMI robot: gold H4, exit at stop

Losing trade. On September 9, 2026, the price was above the 200 EMA, and the +DI crossed above the −DI. The robot bought at 4381.76, with a stop at 4336.28. But there was no follow-through: the next day gold turned lower and hit the stop: −$273, about 1% of the balance at that moment. The loss is capped in advance, and one take-profit trade covers three stops like this.

To do it manually: open gold on H4, add the standard Average Directional Movement Index indicator with period 7 and a 200 EMA. Buy at the open of the next candle if the +DI closed above the −DI (and on the previous candle it was below), the ADX is above 10 and the candle closed above the 200 EMA. Sells are the mirror image, below the 200 EMA. The stop goes at 1.5 ATR(14) from the entry and the take profit three times farther. If the DI lines cross in the opposite direction before the stop or the take profit is triggered, close by hand.

Robot results: training and forward test

So that I don’t fool myself with overfitting, I split the history into two parts. The parameters are chosen using only 10/2020–09/2024. Then the robot takes its exam on 10/2024–09/2026, data the optimizer did not 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, 72 months.

Wilder's DMI robot on gold H4: return in training and in the forward test 10/2024–09/2026
Period (GOLD H4) Return Profit factor Max. drawdown Trades
Training, 10/2020–09/2024 +74.0% 1.35 15.9% 510
Forward, 10/2024–09/2026 +77.3% 1.82 6.6% 284
All 72 months, 1% risk +219.8% 1.56 15.9% 794
All 72 months, 2% risk +935.2% 1.57 31.0% 794
Longest pause without a new high ≈ 12.5 months (05/2023–05/2024)

The forward test came out even better than the training: the profit factor rose from 1.35 to 1.82. Let me tell you why: in 2025–2026 gold moved in strong waves, first a rally and then a deep pullback, and that is exactly what a trend system needs. Don’t count on it always being like this. What matters is something else: it is not a single lucky combination of numbers. Of 98 profitable parameter sets in training, 90 also made money in the forward test. Neighboring parameters also stay positive: DMI 14 instead of 7, with the same filters, returned +45.0% in the forward test with a profit factor of 1.63, and DMI 7 without the ADX filter, +68.4% with a profit factor of 1.48. In the test, the robot ended positive in every full year from 2021 to 2025 and also in 2026 through September; the weakest were 2023 (+8.2%) and 2024 (+5.2%). Speaking plainly about the money: over 72 months swaps took $2,437 and commissions $464, and all of that is already included in the result.

MetaTrader 5 tester report: Wilder's DMI robot on gold H4

📊 Download the robot and the parameters for gold H4

Why the “internet” DMI doesn’t work and this robot does

First I ran the system exactly as Wilder describes it: daily chart, DMI 14, buy when +DI crosses above −DI and sell the other way around, the extreme point rule (enter only if in the following candles the price breaks the high or the low of the crossover candle), reversal on the opposite crossover and a protective stop of 2 ATR. Seven markets, 72 months:

Wilder's DMI in its classic form: D1, 7 instruments, 72 months
Instrument (D1) Result Profit factor Max. drawdown Trades
GOLD +12.4% 1.64 10.8% 46
BITCOIN −1.1% 0.98 19.3% 126
GBPUSD −6.4% 0.77 13.2% 99
EURUSD −10.7% 0.68 15.7% 102
USDJPY −11.5% 0.73 13.6% 93
WTI (oil) −15.2% 0.44 16.2% 78
USDCHF −18.5% 0.49 22.0% 104

Six markets out of seven end up negative or close to zero. Only gold gives a positive result, and that is exactly where the robot works. There are three reasons:

The robot that works differs in exactly that: the 200 EMA cuts the trades against the trend, the take profit at three stops captures the move while it lasts, and H4 gives more signals than D1. For comparison: Wilder’s classic on the same gold H4 returned only +19.5% in 72 months with a profit factor of 1.17, and in the training years it ended negative (−4.0%). The robot is tuned only for gold H4, and I don’t advise moving it to other markets without your own test.

The risks, plainly

Where to run it

The robot works in MetaTrader 5 with any broker that offers gold (XAUUSD or GOLD). My test was done at FxPro. The other brokers in my ranking also work: RoboForex and Tickmill. Before putting the robot on an account, run it in your broker’s tester: it takes an afternoon and shows you how it behaves with your quotes, spreads and swaps. For it to work continuously, keep the platform on a VPS: the robot checks the signal at the close of each H4 candle, and if the platform is off, the signal is missed.

Download Wilder’s DMI robot for free

The robot is free for clients of the brokers in my ranking:

  1. Open a MetaTrader 5 account with one of the brokers above (or use the one you already have).
  2. Go to the Telegram bot with the button and send your account number.
  3. After verification, the bot sends you the archive: the robot, the parameters for gold H4, Wilder’s classic parameters for your own experiments and the instructions.

📊 Download the robot for free on Telegram

My conclusion

Wilder’s DMI in its classic form is a system that flips too often: on the daily chart, six markets out of seven ended negative or close to zero over six years. If you keep Wilder’s idea, trading the shift in strength between buyers and sellers, but take gold on H4, trade only in the direction of the 200 EMA and take profit with a three-stop take profit, you get a robot that tripled the deposit in 72 months with a 15.9% drawdown, and in two unseen years earned more than in the four training years. Its weakest point is the long pauses: there was a year without a new high. Protect your deposit: start with 0.5–1% risk.

Today I also analyzed Chande’s Aroon, another trend robot for gold H4. They are systems with similar logic, so if you put both on the same account, split the risk between them. Other robots for gold: the Awesome Oscillator, Raschke’s “80-20”, the TTM Squeeze and Heikin-Ashi. Another Wilder system: Parabolic SAR + ADX.

Why 72 months?

The market changes fundamentally every 3–5 years: the participants and the volatility change, and trends give way to ranges. That is why I don’t run 10–20-year tests: they blend different markets into a single average figure. Gold is a good example. Since 2023 it has moved in long, strong waves, and the DI crossovers caught the start of the move again and again. A 10–20-year test would mix this market with years when gold spent a lot of time in a range. You have to choose a strategy for the current market and change it when the market changes, and this also applies to this robot: if gold enters a long range, you have to stop it.

That is why I built 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 runs tens of thousands of strategies on its own 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 on historical data do not guarantee future results.

Sources

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.

Where I trade and what I recommend
Forex & CFD brokers
1
FxPro
A broker with a history going back to 2006 and one of the best-known names in the market. Fast execution and many platforms.
MT4MT5cTraderFxPro App
Open account
2
RoboForex
Low minimum deposit and many account types. A good option to start with little capital.
MT4MT5R StocksTraderCopyFX
Open account
3
Tickmill
Low spreads and competitive commissions. Built for people who trade often and count every pip.
MT4MT5Low spreads
Open account
Crypto exchanges
1
Bybit
One of the largest crypto derivatives exchanges. Futures, spot and copy trading in one account.
FuturesSpotCopy trading
Sign up
2
BingX
A very strong exchange for copy trading: you can follow traders and see their results.
Copy tradingFuturesSpot
Sign up
3
KuCoin
Hundreds of cryptocurrencies and plenty of altcoins. Spot, futures and trading bots in one account.
SpotFuturesTrading bots
Sign up
These are affiliate links: if you open an account, I may receive a commission at no cost to you. Trading CFDs, Forex and leveraged crypto carries a high risk of losing money. Check that the service is available in your country and only trade with money you can afford to lose.
Want my 4 indicators for MT5 free for 30 days? Open an account with a trusted broker, send the number to the Telegram bot and get them. No deposit.

Risk warning: CFDs, Forex and crypto derivatives carry a high risk of losing money due to leverage. This article is not investment advice.

Anton Rozhnovsky
Anton Rozhnovsky

Trader for 14 years. He has automated and tested more than 2,000 strategies in trading robots and develops his own indicators for MetaTrader 5.

← PreviousLambert CCI Robot for MT5: +111% on USDJPY in 72 Months

Keep reading

Linear Regression Channel: 72-Month Test and Which MT5 Robot to Use
Strategies

Linear Regression Channel: 72-Month Test and Which MT5 Robot to Use

I tested the linear regression channel over 72 months in MT5: the classic loses on 5 of 7 markets. Which robot to use instead: Williams Fractals, +203%.

EMA Crossover Robot for MT5: +311% on USDJPY in 72 Months
Strategies

EMA Crossover Robot for MT5: +311% on USDJPY in 72 Months

I tested the EMA crossover over 72 months in MT5: the classic EMA 9/21 loses; EMA 13/50 long-only on USDJPY H1 made +311% and +37% forward. Free robot.

Keltner Channel: 72-Month Test and Free MT5 Robot
Strategies

Keltner Channel: 72-Month Test and Free MT5 Robot

I tested the Keltner channel over 72 months on MT5: the classic loses almost everywhere; a wide, buy-only channel passed the forward test on gold H4. Free robot.