Two moving averages and the point where they cross: that is how almost everyone starts when they open a chart for the first time. The fast 9 EMA crosses the slow 21 EMA from below and you buy; from above, you sell. The rule is simple and honest, but in that form it has spent years handing the account over to the spread and to the range “sawtooth.” I tested it on seven markets over 72 months and found a version that held up on two years of data the optimizer never saw. It is a robot for USDJPY on H1. I’ll show you its results, its trades on the chart, its risks, and how to download it for free.
- +310.9% in 72 months on USDJPY H1, risking 1% per trade. Maximum drawdown: 24.8%.
- +36.9% forward (10/2024–09/2026) with a profit factor of 1.43: the robot made money on data it did not see during tuning.
- Risking 2% per trade, the same robot made +1,118.6% in 72 months, but with a 43.4% drawdown.
- In the file: the robot for MetaTrader 5, the .set for USDJPY H1, and the instructions. It is up and running in 5 minutes.
📊 Download the “EMA Crossover” robot for free on Telegram

What the robot does
The crossover of two moving averages is one of the oldest trend methods. John Murphy, in “Technical Analysis of the Financial Markets,” describes it as the “double crossover method”: the buy signal appears when the short average crosses the long one from below. The EMA 9 and EMA 21 pair on the one-hour chart is the most popular version of this rule on the internet. The robot takes the same idea and strips out what was losing money in the history:
- Averages: EMA 13 and EMA 50 instead of 9 and 21. The slow average is longer, so the small oscillations of the range do not produce false signals.
- Entry: buy at the open of the next candle, after the EMA 13 has closed above the EMA 50. New trades only from 04:00 to 20:00 server time (FxPro: UTC+2, UTC+3 in summer).
- Long only. On USDJPY the robot does not open sells on the downward cross: that cross only closes the buy.
- Stop: 1.5 ATR from the entry. There is no take profit: the trade stays open until the EMA 13 crosses below the EMA 50 or the stop is hit.
- Position size: based on risk as a % of balance. In the test, 1%; in the parameters you can set your own.
It is a trend robot: it is right rarely (26.5% winning trades), but in a strong move it holds the position for a long time and takes the biggest part of it.
What it looks like on the chart
Below are two real trades by the robot in the USDJPY H1 test. Both come from the forward period, which the optimizer did not see: one winner and one loser, so you can see the robot as it really is. The blue line is the EMA 13, the pink one is the EMA 50, and the yellow circle marks the crossover.

Winning trade. On July 3, 2025, the EMA 13 crossed the EMA 50 from below. The robot bought at 143.878, with a stop at 143.649, 1.5 ATR from the entry. The cross turned out to be the start of the move: the pair rose for a week, and the robot held the trade until July 10, when the EMA 13 dropped below the EMA 50. Exit at 145.815: +$2,976.

Losing trade. On January 14, 2025, the picture was the same: the EMA 13 rose above the EMA 50 and the robot bought at 157.940, with a stop at 157.459. But an hour and a half later the price dropped and hit the stop: −$391. Then it went up again, without the robot. Most of the robot’s trades look like this, and that is normal: the loss is limited to 1% of the balance, and a single winner covers several stops.
Manually: open USDJPY on H1 and add two exponential moving averages, 13 and 50, on the close. When a candle has closed and the EMA 13 is above the EMA 50, buy at the open of the next candle (from 04:00 to 20:00 server time), with the stop 1.5 ATR(14) below the entry. Close the trade when the EMA 13 crosses below the EMA 50. Do not open sells.
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 did not see. The test: MetaTrader 5 strategy tester, a demo account at FxPro with its quotes, spreads, commissions, and swaps, $10,000 deposit, 1:500 leverage, “1 minute OHLC” mode.

| Period (USDJPY H1) | Return | Profit factor | Max. drawdown | Trades |
|---|---|---|---|---|
| Training, 10/2020–09/2024 | +199.9% | 1.67 | 24.8% | 194 |
| Forward, 10/2024–09/2026 | +36.9% | 1.43 | 13.4% | 100 |
| All 72 months, 1% risk | +310.9% | 1.55 | 24.8% | 294 |
| All 72 months, 2% risk | +1,118.6% | 1.42 | 43.4% | 294 |
| Longest pause without a new high | ≈ 17 months (08/2022–01/2024) |
The most important thing here is the forward. On unknown data, the profit factor dropped from 1.67 to 1.43, but it held firm, and the drawdown was even lower than in training. And it is not a single lucky combination of numbers: of 121 profitable sets in training, 83 also made money in the forward. All the neighboring sets with a slow EMA of 45–50 and long only were also positive in the forward; for example, EMA 7/45 with a 2 ATR stop made +36.8% with a profit factor of 1.50. Let me be frank with you about the money: over 72 months, commissions took $2,920, and the swaps on USDJPY buys at FxPro were positive in the test and added $4,525. The robot holds the trade for several days, and with the current rate differential that is paid to the buyer. If rates converge, that bonus will disappear.

📊 Download the robot and the parameters for USDJPY H1
Why the “internet” EMA 9/21 doesn’t work and this robot does
First I ran the strategy the way it is usually described: H1, the EMA 9 crosses above the EMA 21 and you buy, crosses below and you sell; the trade flips at every cross, with a 2 ATR stop in case of a sharp move. Seven markets, 72 months:

| Instrument (H1) | Result | Profit factor | Max. drawdown | Trades |
|---|---|---|---|---|
| USDJPY | +183.0% | 1.14 | 53.9% | 1,519 |
| GOLD | −3.2% | 0.99 | 57.7% | 1,662 |
| EURUSD | −70.5% | 0.86 | 76.3% | 1,656 |
| WTI (oil) | −72.5% | 0.83 | 76.5% | 1,589 |
| BITCOIN | −79.4% | 0.87 | 89.7% | 1,961 |
| GBPUSD | −87.2% | 0.74 | 88.4% | 1,687 |
| USDCHF | −92.5% | 0.65 | 93.7% | 1,691 |
Five of the seven markets lost between 70% and 92% of the deposit. The only positive one is USDJPY, but with a 53.9% drawdown: almost nobody can stick with an equity curve like that in live trading. There are three reasons:
- The range sawtooth. On H1 the 9 and 21 averages cross several times a week: in 72 months, about 1,600 trades per market. Only between 23% and 28% closed in profit.
- Costs on every cross. The spread and the commission are paid on every one of those trades. When the average profit is small, they eat the entire edge.
- Sells against the trend. On USDJPY the classic version paid $6,321 in swaps, mostly on the sells: the pair rose for years, and holding a yen sell against the rate differential is expensive.
The robot that works differs in exactly that: a slow EMA of 50 instead of 21, with several times fewer false signals; long only, in the direction of the pair’s trend; trading during active hours. The idea is the same: enter when the fast average crosses the slow one. The robot is configured only for USDJPY H1, and I don’t recommend carrying it over to other markets without your own test.
The risks, no makeup
- Long pauses. From August 2022 to January 2024 the robot’s balance did not make a new high: about 17 months. The maximum equity drawdown over the 72 months was 24.8%.
- Long streaks of stops. Only 26.5% of trades close in profit. The longest streak: 19 stops in a row, from May to September 2024, around −$6,200, roughly a fifth of the balance. If you are not ready for streaks like that, it is better not to run this robot.
- The robot only buys USDJPY. It makes money while the pair, overall, rises. In 2025, when the yen strengthened, the robot closed the year with a small loss (−$1,103). If the Bank of Japan strengthens the yen for a long time, the buys on the crosses will start to lose. The swap bonus also depends on the rate differential.
- A 2% risk nearly doubles the drawdown: 43.4% instead of 24.8%. I would start with 0.5–1% and raise the risk only after seeing the robot work live with you.
Where to run the robot
The robot works in MetaTrader 5 with any broker that offers USDJPY. 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, spreads, and swaps. Mind the server time: the parameters are calculated for the FxPro server (UTC+2, UTC+3 in summer); if your broker uses a different time, shift StartHour and EndHour. For it to work without pauses, leave the platform on a VPS: the robot checks the signal on every new one-hour candle.
Download the “EMA Crossover” 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 USDJPY H1, the classic EMA 9/21 parameters for your own experiments, and the instructions.
📊 Download the “EMA Crossover” robot for free on Telegram
My conclusion
The EMA 9/21 crossover on the one-hour chart is a correct idea with bad parameters: the averages are too fast, there are too many trades, and half of them are sells against the trend. If you lengthen the slow average, trade only in the direction of the pair’s trend, and only during active hours, you get a robot that multiplied the deposit by four on USDJPY over 72 months with a 24.8% drawdown, and that made 36.9% over two unknown years with a profit factor of 1.43. The forward confirmed it, and the neighboring settings behaved the same way; that is why I have confidence in this robot. But remember: it is a bet on USDJPY rising, it is right rarely, and it knows how to sit still for a long time. Protect your deposit: start with a 0.5–1% risk.
Today I also published the analysis of the triple EMA 4/9/18, a three-average system. On USDJPY, the previous day breakout, Raschke’s “Holy Grail”, and Supertrend also passed the test. Other moving average strategies: the 50/200 “Golden Cross” and MACD + EMA 200.
Why 72 months?
The market changes fundamentally every 3–5 years: the participants and the volatility change, and trends give way to ranges. USDJPY is a good example. From 2021 to 2024 the pair rose almost without pauses, and the upward crosses worked. In 2025 the yen strengthened, and the robot spent more time out of the market and piling up stops. A 10–20 year test would have blended those eras into a single average figure. You have to choose a strategy for the current market, and change it when the market changes; that applies to this robot too: if USDJPY enters a long decline, 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 automatically runs tens of thousands of strategies and shows you the ones that work over the last 6, 12, and 36 months. It does not promise profits: it helps you notice in time that the market has changed.
Backtest results do not guarantee future results.
Sources
- John J. Murphy: “Technical Analysis of the Financial Markets” (New York Institute of Finance, 1999), moving averages and the double crossover method.
- Perry J. Kaufman: “Trading Systems and Methods” (Wiley), systems based on moving average crossovers.
- Own tests in MetaTrader 5 on the FxPro demo server, November 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.


