Join waitlist
Strategies / Trend / EMA Cross With MACD Filter

EMA Cross With MACD Filter

This idea trades EMA crossovers that agree with the MACD histogram and a mid-range RSI. Each trade uses a fixed stop beyond the 50-bar extreme and a target set 1.618 times the 50-bar range away.

TrendLong & shortSwingUSD/JPYDaily
1.80Profit factor
126,780Net profit USD
32.46%Win rate
496Trades
-17,210Max drawdown
256Avg trade

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

Entry rules, long

  1. The MACD histogram is above zero, and the MACD line is above its 9-period signal line.
  2. RSI(14) is between 40 and 75.
  3. The stop, 0.2% below the 50-bar low, lies below the close, and the target lies above the close.

Entry rules, short

  1. The MACD histogram is below zero, and the MACD line is below its 9-period signal line.
  2. RSI(14) is between 25 and 60.
  3. The stop, 0.2% above the 50-bar high, lies above the close, and the target lies below the close.

Exit rules

  1. A target sits at the 50-bar high plus 1.618 times the 50-bar range for longs, or the 50-bar low minus 1.618 times the range for shorts.
  2. An opposite signal closes the trade and reverses it.

Test conditions

PeriodUp to 2026-10-11
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-11

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
USD/JPYBest runDaily1.80 49632.46126,780 USD-17,210
Silver4 hoursn/a 1,05831.5737,221 USD-19,883
Nikkei 225Dailyn/a 37537.0725,151 USD-24,246
Dow Jones4 hoursn/a 34836.4920,894 EUR-9,750
Nasdaq 100Dailyn/a 36033.3317,235 EUR-5,452
Brent Crude1 hourn/a 2,03834.5914,162 EUR-4,095
US Crude Oil1 hourn/a 2,90434.958,267 EUR-5,271
DAX 4030 minn/a 6,45232.957,903 EUR-5,989
Gold4 hoursn/a 1,02034.713,207 EUR-885
GoldDailyn/a 45134.812,538 EUR-809
Gold1 hourn/a 3,88132.961,869 EUR-741
S&P 500Dailyn/a 50930.841,470 EUR-1,208

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

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

DEFPARAM CumulateOrders = false

emas = ExponentialAverage[9](close)
emal = ExponentialAverage[20](close)
myRsi = RSI[14](close)
myMacd = ExponentialAverage[12](close) - ExponentialAverage[26](close)
sig = ExponentialAverage[9](myMacd)
hist = myMacd - sig
sh = highest[50](high)
sl = lowest[50](low)
rng = sh - sl
buystop = sl - sl * 0.002
buytp = sh + rng * 1.618
sellstop = sh + sh * 0.002
selltp = sl - rng * 1.618

15 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
Longer historyRe-run on up to 1,000,000 barsUSD/JPY · Daily · older data 0.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 run126,780.00 USD
Net, long run126,780.00 USD
Net on the older data alone0.00 USD
Read this firstKnown weaknesses2 points
  • Results include the spread only. Commissions and overnight financing are not included.
  • The code is published as it was backtested and has not been compiled again since.

Questions

About this strategy

Can I run EMA Cross With MACD 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.80 over 496 trades.

How large was the drawdown?

The best run had a maximum drawdown of 17,210 USD at the tested position size, against a net result of 126,780 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

WMA Vote ATR Band Exit

Also a trend strategy.

1.80 PF · 198 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