Buys when the 9 EMA crosses above the 21 EMA with the close above the 50 EMA, or when the EMAs stack upward, with MACD and RSI confirming. Shorts mirror these rules, with exits on a reverse EMA cross or extreme RSI.
Best run of 5. Nasdaq 100, 1 hour, spread 3, from run sweeps:2026-10-04-NAS100-1h-opt.tsv:73.
| Period | Up to 2026-10-04 |
| Instrument | Nasdaq 100, 1 hour |
| Spread | 3 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-07 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| Nasdaq 100Best run | 1 hour | n/a | 2,480 | 33.51 | 5,121 EUR | -4,582 |
| USD/JPY | Daily | n/a | 975 | 31.79 | 14,020 USD | -9,330 |
| US Crude Oil | 4 hours | n/a | 912 | 31.36 | 4,571 EUR | -3,905 |
| Gold | 4 hours | n/a | 1,546 | 33.12 | 1,298 EUR | -529 |
| Gold | Daily | n/a | 210 | 33.81 | 1,172 EUR | -741 |
Charts
The code
// ============================================================== // EMA Crossover With MACD Filter (long and short) 3 // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 1 hour // ============================================================== DEFPARAM CumulateOrders = false emafast = ExponentialAverage[9](close) emaslow = ExponentialAverage[21](close) ematrend = ExponentialAverage[50](close) myRsi = RSI[14](close) myMacd = MACDLine[12,26,9](close) sig = ExponentialAverage[9](myMacd) volma = Average[20](Volume)
48 more lines: the entry and exit rules.
Setup
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 5 market and timeframe combinations. The best run by trade count was Nasdaq 100, 1 hour, with 2,480 trades.
The best run had a maximum drawdown of 4,582 EUR at the tested position size, against a net result of 5,121 EUR.
It trades both long and short.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.