Join waitlist
Strategies / Momentum / MACD Cross With EMA Filter

MACD Cross With EMA Filter

The strategy trades MACD signal crosses that agree with an 18 period EMA trend filter. Positions close on a 10 period average band break or an opposite MACD cross.

MomentumLong & shortSwingUSD/JPYDaily
1.36Profit factor
1,758,880Net profit USD
34.33%Win rate
571Trades
-393,000Max drawdown
3,080Avg trade

Best run of 12. USD/JPY, Daily, spread 1, from run pf:2026-10-04-USDJPY-D.tsv:10.

Entry rules, long

  1. The close is above the 18 period EMA.
  2. No position is open.

Entry rules, short

  1. The close is below the 18 period EMA.
  2. No position is open.

Exit rules

  1. The close rises above the 10 period average of highs, or the MACD line crosses above its signal line, closing the short.

Test conditions

PeriodUp to 2026-10-04
InstrumentUSD/JPY, Daily
Spread1 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
USD/JPYBest runDaily1.36 57134.331,758,880 USD-393,000
USD/JPY4 hoursn/a 1,38736.84351,950 USD-216,900
EUR/USDDailyn/a 56034.6458,159 USD-32,520
SilverDailyn/a 53233.4630,723 USD-22,135
Nikkei 225Dailyn/a 48037.9222,548 USD-19,318
Silver4 hoursn/a 1,22833.7121,792 USD-13,975
DAX 404 hoursn/a 1,23736.467,150 EUR-4,118
DAX 40Dailyn/a 69336.805,541 EUR-5,302
GBP/USD4 hoursn/a 1,81535.045,213 USD-3,535
GBP/USDDailyn/a 58137.015,198 USD-4,746
GoldDailyn/a 57536.522,060 EUR-1,401
Gold4 hoursn/a 1,23435.251,794 EUR-732

Charts

Results by run

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

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// MACD Cross With EMA Filter
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Long & short
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

ema = ExponentialAverage[18](close)
smahigh = Average[10](high)
smalow = Average[10](low)
myMacd = MACDline[12,26,9](close)
signal = ExponentialAverage[9](myMacd)

19 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

MACDEMASMA
Longer historyRe-run on up to 1,000,000 barsUSD/JPY · Daily · older data -1,010.00 USD

USD/JPY had no history beyond the standard run, so both runs used 12,000 bars.

USD/JPY · Daily

Bars available12,000
Net, standard 200,000-bar run1,758,880.00 USD
Net, long run1,757,870.00 USD
Net on the older data alone-1,010.00 USD
Read this firstKnown weaknesses2 points
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run MACD Cross With EMA 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 12 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.36 over 571 trades.

How large was the drawdown?

The best run had a maximum drawdown of 393,000 USD at the tested position size, against a net result of 1,758,880 USD.

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

EMA 8 21 RSI Filtered Bracket

Best run on the same market, USD/JPY.

1.09 PF · 6,194 trades

RSI Volatility Momentum

Also a momentum strategy.

1.36 PF · 283 trades

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

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