Join waitlist
Strategies / Trend / MACD Crossover ADX Trend Filter

MACD Crossover ADX Trend Filter

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.

TrendLong & shortSwingUS Crude Oil1 hour
n/aProfit factor
3,547Net profit EUR
36.72%Win rate
689Trades
-1,441Max drawdown
5.15Avg trade

Best run of 9. US Crude Oil, 1 hour, spread 3, from run sweeps:2026-10-03-CRUDE-1h-opt.tsv:5.

Entry rules, long

  1. The MACD line is below zero.
  2. The close is above the 200 period EMA.
  3. ADX (14 period) is above 20.
  4. No long position is open.

Entry rules, short

  1. The MACD line is above zero.
  2. The close is below the 200 period EMA.
  3. ADX (14 period) is above 20.
  4. No short position is open.

Exit rules

  1. A stop sits 2.0 times the 14 period ATR from the entry price.
  2. A target sits at the stop distance multiplied by 2.0 from the entry price.

Test conditions

PeriodUp to 2026-10-03
InstrumentUS Crude Oil, 1 hour
Spread3 points
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-10-03

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
US Crude OilBest run1 hourn/a 68936.723,547 EUR-1,441
USD/JPYDailyn/a 9746.3912,440 USD-1,750
Dow Jones4 hoursn/a 9546.326,933 EUR-2,998
Nasdaq 100Dailyn/a 8348.196,432 EUR-2,635
DAX 40Dailyn/a 7647.376,153 EUR-1,619
US Crude OilDailyn/a 7147.893,664 EUR-1,879
FTSE 100Dailyn/a 7143.661,723 EUR-879
S&P 500Dailyn/a 10140.59976 EUR-309
GoldDailyn/a 10542.86533 EUR-227

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// 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

How to load it

  1. Copy the code with the copy button on the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Indicators used

MACDEMAADXATR
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run MACD Crossover ADX Trend Filter in ProOrder?

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.

Which markets was it tested on?

It was tested on 9 market and timeframe combinations. The best run by trade count was US Crude Oil, 1 hour, with 689 trades.

How large was the drawdown?

The best run had a maximum drawdown of 1,441 EUR at the tested position size, against a net result of 3,547 EUR.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Slow MACD Slope

Uses the same indicator.

6.80 PF · 7,305 trades

Short Term RSI Pullback Long Short

Best run on the same market, US Crude Oil.

1.33 PF · 493 trades

ADX Filtered EMA Cross

Also a trend strategy.

1.15 PF · 607 trades

See how ProRealAlgos combines strategies like this into one automated portfolio.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs