Join today
Strategies / Trend / ADX Filtered EMA Cross

ADX Filtered EMA Cross

Two exponential averages, 20 and 50 periods, give the direction, and a trade is taken only when ADX(14) reads above 25 at the moment of the cross. It trades both long and short and stays in until the averages cross back or a 1% stop is hit.

TrendLong & shortSwingNasdaq 1001 hour
1.15Profit factor
3,805Net profit EUR
26.19%Win rate
607Trades
-3,530Max drawdown
6.27Avg trade

Best run of 16. Nasdaq 100, 1 hour, spread 3, from run pf:2026-09-15-NAS100-1h.tsv:1.

Entry rules, long

  1. The 20-period EMA crosses above the 50-period EMA
  2. Members only
  3. No position is open

Entry rules, short

  1. The 20-period EMA crosses below the 50-period EMA
  2. Members only
  3. No position is open

Exit rules

  1. Stop loss at 1% from entry
  2. Members only
  3. Close a short when the 20 EMA is back above the 50 EMA

Test conditions

PeriodUp to 2026-09-15
InstrumentNasdaq 100, 1 hour
Spread3 points
Contracts1
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-09-15

Parameters

positionSize
Contracts per trade
1
fastPeriod
Fast EMA length
20
slowPeriod
Slow EMA length
50
adxPeriod
ADX length
14
adxThreshold
Minimum ADX reading to take a cross
25
stopLossPct
Protective stop as percent of entry price
1

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nasdaq 100Best run1 hour1.15 60726.193,805 EUR-3,530
Nasdaq 1005 min1.13 65031.693,397 EUR-2,190
DAX 4030 minn/a 73433.383,275 EUR-3,460
DAX 4015 minn/a 69530.79950 EUR-2,725
Nasdaq 10015 minn/a 81629.41778 EUR-5,197
Gold1 hourn/a 52627.57530 EUR-843
S&P 50030 minn/a 71728.59-97.07 EUR-1,509
S&P 5005 minn/a 62627.64-119 EUR-626
Gold5 minn/a 57129.07-375 EUR-722
Nasdaq 10030 minn/a 78728.34-558 EUR-4,518
S&P 5001 hourn/a 55327.49-609 EUR-1,521
S&P 50015 minn/a 75728.67-717 EUR-1,269
Gold30 minn/a 67327.49-794 EUR-1,145
Gold15 minn/a 66526.92-1,683 EUR-1,797
DAX 405 minn/a 59827.42-2,462 EUR-4,023
DAX 401 hourn/a 49026.94-3,949 EUR-6,854

Charts

Results by run

Profit factor by run

Above 1.0 made money, below 1.0 lost money.

0.00.51.01.52.01.0 = break-evenNasdaq 100 · 1 hour1.15Nasdaq 100 · 5 min1.13

Net profit against max drawdown

Net profitMax drawdown
0-10K-5K3K5KNasdaq 100 · 1 hourNasdaq 100 · 5 minDAX 40 · 30 minDAX 40 · 15 minNasdaq 100 · 15 minGold · 1 hourS&P 500 · 30 minS&P 500 · 5 minGold · 5 minNasdaq 100 · 30 minS&P 500 · 1 hourS&P 500 · 15 minGold · 30 minGold · 15 minDAX 40 · 5 minDAX 40 · 1 hour

The code

ProBuilder, rewritten to house standard

Every file in the library uses the same header, the same section order and the same variable names. The numbers above were produced by the original version before the rewrite, and the rewrite has not yet been compiled in ProRealTime.

// ============================================================
// ADX Filtered EMA Cross
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: 1 hour
// ============================================================

// --- Settings ---
DEFPARAM CumulateOrders = false

// --- Parameters ---
positionSize = 1       // contracts per trade
fastPeriod = 20        // fast EMA length
slowPeriod = 50        // slow EMA length
adxPeriod = 14         // ADX length
adxThreshold = 25      // only trade crosses when the trend is this strong
stopLossPct = 1        // protective stop, percent of entry price

// --- Indicators ---
fastMA = ExponentialAverage[fastPeriod](close)
slowMA = ExponentialAverage[slowPeriod](close)
adxValue = ADX[adxPeriod]

26 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • The best run on Nasdaq 100 1 hour made EUR 3,805 but had a max drawdown of EUR 3,530.20, so the drawdown nearly equals the total profit.
  • Only 26.19% of trades won in the best run. The system depends on a small number of long trends paying for many small losses.
  • Results are mixed across markets: every S&P 500 timeframe lost money, and DAX 40 on 1 hour ended at EUR -3,948.70.
  • Profit factor was only recorded for the Nasdaq 100 runs (1.15 on 1 hour, 1.13 on 5 minutes). The other rows come from sweep data without it.

Indicators used

EMAADX

How to load it

  1. Copy the code with the copy button above 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.

Questions

About this strategy

Can I run the ADX Filtered EMA Cross live in ProOrder?

Yes, it is a standard ProOrder system with a fixed stop. The code was rewritten after testing and has not been compile-checked yet, and the stats come from the version before the rewrite, so run it in demo first.

Where did it do best?

Nasdaq 100 on 1 hour gave the best run, EUR 3,805 over 607 trades with a profit factor of 1.15. DAX 40 on 30 minutes also made EUR 3,274.50, while all four S&P 500 timeframes and most Gold timeframes lost.

How much capital does one contract need?

At 1 contract per trade the best run had a max drawdown of EUR 3,530.20. Margin depends on your broker, so size your account around that drawdown, not around the profit figure.

Why does the ADX filter matter here?

A plain EMA cross gets whipsawed in sideways markets. Requiring ADX(14) above 25 skips crosses that happen when there is no trend, which is where most of those losses come from.

Related

Strategies like this one

Monday Dip Buy

Uses the same indicator.

n/a PF · 146 trades

Negated Hammer

Best run on the same market, Nasdaq 100.

3.20 PF · 372 trades

SMA Cross 10/30

A similar profit factor.

1.14 PF · 2,495 trades

Want to see how trend systems like this fit into a portfolio? Join the ProRealAlgos community waitlist.

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