The strategy buys MACD crossovers below zero that agree with a 200 period EMA trend when ADX is above 20, and shorts the mirror setup. Each trade has a stop at 2.0 times the 14 period ATR and a target at the stop distance multiplied by 2.0.
Best run of 9. US Crude Oil, 1 hour, spread 3, from run sweeps:2026-10-03-CRUDE-1h-opt.tsv:5.
| Period | Up to 2026-10-03 |
| Instrument | US Crude Oil, 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-03 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| US Crude OilBest run | 1 hour | n/a | 689 | 36.72 | 3,547 EUR | -1,441 |
| USD/JPY | Daily | n/a | 97 | 46.39 | 12,440 USD | -1,750 |
| Dow Jones | 4 hours | n/a | 95 | 46.32 | 6,933 EUR | -2,998 |
| Nasdaq 100 | Daily | n/a | 83 | 48.19 | 6,432 EUR | -2,635 |
| DAX 40 | Daily | n/a | 76 | 47.37 | 6,153 EUR | -1,619 |
| US Crude Oil | Daily | n/a | 71 | 47.89 | 3,664 EUR | -1,879 |
| FTSE 100 | Daily | n/a | 71 | 43.66 | 1,723 EUR | -879 |
| S&P 500 | Daily | n/a | 101 | 40.59 | 976 EUR | -309 |
| Gold | Daily | n/a | 105 | 42.86 | 533 EUR | -227 |
Charts
The code
// ============================================================== // MACD Crossover ADX Trend Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 1 hour // ============================================================== DEFPARAM CumulateOrders = false myMacdline = MACDline[12,26,9](close) signalline = ExponentialAverage[9](myMacdline) trendema = ExponentialAverage[200](close) myAdx = ADX[14] myAtr = AverageTrueRange[14](close)
30 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 9 market and timeframe combinations. The best run by trade count was US Crude Oil, 1 hour, with 689 trades.
The best run had a maximum drawdown of 1,441 EUR at the tested position size, against a net result of 3,547 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.