Join waitlist
Strategies / Trend / Trend Filtered MACD Crossover

Trend Filtered MACD Crossover

Buys 1 contract when the close is above the 200 period EMA, the 20 period EMA is above the 50 period EMA, and MACD crosses above its signal line with RSI between 29 and 70. Exits on a 2% stop or 1.5% target.

TrendLong onlyIntradayUS Crude Oil30 min
n/aProfit factor
3,924Net profit EUR
58.15%Win rate
1,061Trades
-2,521Max drawdown
3.70Avg trade

Best run of 27. US Crude Oil, 30 min, spread 3, from run sweeps:2026-10-04-CRUDE-30m-opt.tsv:2.

Entry rules, long

  1. The close is above the 200 period EMA, and the 20 period EMA is above the 50 period EMA.
  2. The 14 period RSI is between 29 and 70.

Exit rules

  1. A target is set 1.5% above the entry price.

Test conditions

PeriodUp to 2026-10-04
InstrumentUS Crude Oil, 30 minutes
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-04

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
US Crude OilBest run30 minn/a 1,06158.153,924 EUR-2,521
USD/JPY10 minn/a 15764.33489,090 USD-235,450
USD/JPY1 hourn/a 35760.22459,190 USD-310,640
USD/JPY2 minn/a 2268.18154,160 USD-101,800
Dow Jones15 minn/a 33160.1210,826 EUR-5,844
Nasdaq 1001 minn/a 7365.755,517 EUR-4,401
DAX 404 hoursn/a 28259.574,245 EUR-2,267
Nasdaq 1004 hoursn/a 31461.464,043 EUR-2,940
US Crude Oil10 minn/a 86959.153,988 EUR-3,859
Brent Crude3 minn/a 41160.343,844 EUR-2,068
GBP/USDDailyn/a 13762.043,556 USD-1,707
FTSE 1005 minn/a 9566.322,471 EUR-949
US Crude Oil3 minn/a 45959.912,411 EUR-2,284
FTSE 10010 minn/a 21361.032,294 EUR-1,063
US Crude Oil4 hoursn/a 27060.002,259 EUR-1,202
S&P 50015 minn/a 43561.152,045 EUR-1,412
Gold10 minn/a 34862.361,761 EUR-1,117
Gold15 minn/a 42062.141,626 EUR-1,189
Gold2 minn/a 18263.741,561 EUR-1,037
Gold30 minn/a 65359.571,421 EUR-867
FTSE 1003 minn/a 7462.161,343 EUR-1,139
S&P 5005 minn/a 14961.741,300 EUR-1,087
S&P 5001 hourn/a 54159.521,248 EUR-1,150
Gold1 hourn/a 59460.771,195 EUR-670
Gold4 hoursn/a 26263.741,067 EUR-314
S&P 5001 minn/a 3265.62785 EUR-521
GoldDailyn/a 18559.46408 EUR-163

Charts

Results by run

Top 10 of 27 runs. The full list is in the table above.

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Trend Filtered MACD Crossover
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long only
// Timeframe tested: 30 minutes
// ==============================================================

DEFPARAM CumulateOrders = false

emaa = ExponentialAverage[20](close)
emab = ExponentialAverage[50](close)
emac = ExponentialAverage[200](close)
myRsi = RSI[14](close)
myMacd = MACDLine[12,26,9](close)
signal = ExponentialAverage[9](myMacd)

10 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

EMAMACDRSI
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 2,521 EUR is large next to the net profit of 3,924 EUR.

Questions

About this strategy

Can I run Trend Filtered MACD Crossover 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 27 market and timeframe combinations. The best run by trade count was US Crude Oil, 30 minutes, with 1,061 trades.

How large was the drawdown?

The best run had a maximum drawdown of 2,521 EUR at the tested position size, against a net result of 3,924 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 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

Want strategies that are already part of a live portfolio? Join the ProRealAlgos waitlist.

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