Join waitlist
Strategies / Trend / EMA Crossover With MACD Filter (long and short) 3

EMA Crossover With MACD Filter (long and short) 3

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.

TrendLong & shortSwingNasdaq 1001 hour
n/aProfit factor
5,121Net profit EUR
33.51%Win rate
2,480Trades
-4,582Max drawdown
2.06Avg trade

Best run of 5. Nasdaq 100, 1 hour, spread 3, from run sweeps:2026-10-04-NAS100-1h-opt.tsv:73.

Entry rules, long

  1. Or the EMAs are stacked 9 above 21 above 50, with the close between the 21 EMA and 1.02 times it.
  2. For the stacked setup, the MACD line (12, 26, 9) is above its signal line and RSI(14) is between 40 and 70.
  3. Volume is above its 20-bar average.
  4. Only when no position is open.

Entry rules, short

  1. Or the EMAs are stacked 9 below 21 below 50, with the close below the 21 EMA but above 0.98 times it.
  2. For the stacked setup, the MACD line is below its signal line and RSI(14) is between 30 and 60.
  3. Volume is above its 20-bar average.
  4. Only when no position is open.

Exit rules

  1. A short closes when the 9 EMA crosses above the 21 EMA, the close is above the 50 EMA, or RSI(14) is below 25.
  2. Each entry has a stop 2 times ATR(14) from the entry price, and a target 2 times that distance from the entry price.

Test conditions

PeriodUp to 2026-10-04
InstrumentNasdaq 100, 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-07

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nasdaq 100Best run1 hourn/a 2,48033.515,121 EUR-4,582
USD/JPYDailyn/a 97531.7914,020 USD-9,330
US Crude Oil4 hoursn/a 91231.364,571 EUR-3,905
Gold4 hoursn/a 1,54633.121,298 EUR-529
GoldDailyn/a 21033.811,172 EUR-741

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

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

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

EMAMACDRSIATRVolume
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 4,582 EUR is large next to the net profit of 5,121 EUR.

Questions

About this strategy

Can I run EMA Crossover With MACD Filter (long and short) 3 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 5 market and timeframe combinations. The best run by trade count was Nasdaq 100, 1 hour, with 2,480 trades.

How large was the drawdown?

The best run had a maximum drawdown of 4,582 EUR at the tested position size, against a net result of 5,121 EUR.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

Volatility Spike Regression Long

Best run on the same market, Nasdaq 100.

1.22 PF · 1,850 trades

ADX Filtered EMA Cross

Also a trend strategy.

1.15 PF · 607 trades

Put your name on the ProRealAlgos waitlist to trade a tested portfolio instead of single strategies.

Copy trading on US indices is available to ProRealAlgos members as spots open.

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