The strategy trades MACD signal crosses that agree with an 18 period EMA trend filter. Positions close on a 10 period average band break or an opposite MACD cross.
Best run of 12. USD/JPY, Daily, spread 1, from run pf:2026-10-04-USDJPY-D.tsv:10.
| Period | Up to 2026-10-04 |
| Instrument | USD/JPY, Daily |
| Spread | 1 points |
| Starting capital | 1,000,000 |
| Costs | Spread only. Commissions and overnight financing are not included. |
| Bars | Up to 200,000 bars, fewer where the instrument has less history |
| Last tested | 2026-10-04 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | 1.36 | 571 | 34.33 | 1,758,880 USD | -393,000 |
| USD/JPY | 4 hours | n/a | 1,387 | 36.84 | 351,950 USD | -216,900 |
| EUR/USD | Daily | n/a | 560 | 34.64 | 58,159 USD | -32,520 |
| Silver | Daily | n/a | 532 | 33.46 | 30,723 USD | -22,135 |
| Nikkei 225 | Daily | n/a | 480 | 37.92 | 22,548 USD | -19,318 |
| Silver | 4 hours | n/a | 1,228 | 33.71 | 21,792 USD | -13,975 |
| DAX 40 | 4 hours | n/a | 1,237 | 36.46 | 7,150 EUR | -4,118 |
| DAX 40 | Daily | n/a | 693 | 36.80 | 5,541 EUR | -5,302 |
| GBP/USD | 4 hours | n/a | 1,815 | 35.04 | 5,213 USD | -3,535 |
| GBP/USD | Daily | n/a | 581 | 37.01 | 5,198 USD | -4,746 |
| Gold | Daily | n/a | 575 | 36.52 | 2,060 EUR | -1,401 |
| Gold | 4 hours | n/a | 1,234 | 35.25 | 1,794 EUR | -732 |
Charts
Top 10 of 12 runs. The full list is in the table above.
The code
// ============================================================== // MACD Cross With EMA Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ema = ExponentialAverage[18](close) smahigh = Average[10](high) smalow = Average[10](low) myMacd = MACDline[12,26,9](close) signal = ExponentialAverage[9](myMacd)
19 more lines: the entry and exit rules.
Setup
USD/JPY had no history beyond the standard run, so both runs used 12,000 bars.
| Bars available | 12,000 |
| Net, standard 200,000-bar run | 1,758,880.00 USD |
| Net, long run | 1,757,870.00 USD |
| Net on the older data alone | -1,010.00 USD |
Questions
Yes. The code is ProBuilder and runs as an automated ProOrder system. Backtest it on your own account with your own spread and position size before trading it live.
It was tested on 12 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.36 over 571 trades.
The best run had a maximum drawdown of 393,000 USD at the tested position size, against a net result of 1,758,880 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.