This idea trades EMA crossovers that agree with the MACD histogram and a mid-range RSI. Each trade uses a fixed stop beyond the 50-bar extreme and a target set 1.618 times the 50-bar range away.
Best run of 12. USD/JPY, Daily, spread 1, from run pf:2026-10-11-USDJPY-D.tsv:2.
| Period | Up to 2026-10-11 |
| 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-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | 1.80 | 496 | 32.46 | 126,780 USD | -17,210 |
| Silver | 4 hours | n/a | 1,058 | 31.57 | 37,221 USD | -19,883 |
| Nikkei 225 | Daily | n/a | 375 | 37.07 | 25,151 USD | -24,246 |
| Dow Jones | 4 hours | n/a | 348 | 36.49 | 20,894 EUR | -9,750 |
| Nasdaq 100 | Daily | n/a | 360 | 33.33 | 17,235 EUR | -5,452 |
| Brent Crude | 1 hour | n/a | 2,038 | 34.59 | 14,162 EUR | -4,095 |
| US Crude Oil | 1 hour | n/a | 2,904 | 34.95 | 8,267 EUR | -5,271 |
| DAX 40 | 30 min | n/a | 6,452 | 32.95 | 7,903 EUR | -5,989 |
| Gold | 4 hours | n/a | 1,020 | 34.71 | 3,207 EUR | -885 |
| Gold | Daily | n/a | 451 | 34.81 | 2,538 EUR | -809 |
| Gold | 1 hour | n/a | 3,881 | 32.96 | 1,869 EUR | -741 |
| S&P 500 | Daily | n/a | 509 | 30.84 | 1,470 EUR | -1,208 |
Charts
Top 10 of 12 runs. The full list is in the table above.
The code
// ============================================================== // EMA Cross With MACD Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false emas = ExponentialAverage[9](close) emal = ExponentialAverage[20](close) myRsi = RSI[14](close) myMacd = ExponentialAverage[12](close) - ExponentialAverage[26](close) sig = ExponentialAverage[9](myMacd) hist = myMacd - sig sh = highest[50](high) sl = lowest[50](low) rng = sh - sl buystop = sl - sl * 0.002 buytp = sh + rng * 1.618 sellstop = sh + sh * 0.002 selltp = sl - rng * 1.618
15 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 | 126,780.00 USD |
| Net, long run | 126,780.00 USD |
| Net on the older data alone | 0.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.80 over 496 trades.
The best run had a maximum drawdown of 17,210 USD at the tested position size, against a net result of 126,780 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.