Join today
Strategies / Momentum / Momentum Range Differential

Momentum Range Differential: buying sudden bursts of range

The system compares 5 bar momentum with 100 bar momentum and the 4 bar average range with the 100 bar average range. When both short readings jump well above the long ones on an up close with a rising 18 EMA, it buys. It takes profit at 43 points or later exits once the 53 EMA turns down.

MomentumLong onlyIntradayDAX 4030 min
n/aProfit factor
4,949Net profit EUR
75.20%Win rate
1,512Trades
-4,212Max drawdown
3.27Avg trade

Best run of 13. DAX 40, 30 min, spread 3, from run sweeps:2026-09-26-DAX40-30m-opt.tsv:2.

Entry rules, long

  1. Short-term momentum (5) exceeds long-term momentum (100) in size by at least 2
  2. Members only
  3. The bar closes up
  4. The 18-period EMA is rising
  5. No position is open

Exit rules

  1. Profit target 43 points
  2. Members only
  3. No stop loss

Test conditions

PeriodUp to 2026-09-26
InstrumentDAX 40, 30 minutes
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-26

Parameters

positionSize
Contracts per trade
1
takeProfitPoints
Profit target in points
43
minBarsInTrade
Earliest bar after entry that the trend exit may fire
43
momentumShortPeriod
Short momentum length
5
momentumLongPeriod
Long momentum length
100
rangeShortPeriod
Short average range length
4
rangeLongPeriod
Long average range length
100
momentumThreshold
Minimum momentum differential to buy
2
rangeThreshold
Minimum range differential to buy
8.5
fastPeriod
Fast EMA length, must be rising to buy
18
slowPeriod
Slow EMA length, falling slow EMA ends the trade
53
entryBar
Bar index of the last entry
0

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
DAX 40Best run30 minn/a 1,51275.204,949 EUR-4,212
Silver4 hoursn/a 9174.734,943 USD-3,351
DAX 40Dailyn/a 11198.203,659 EUR-1,340
DAX 401 hourn/a 96783.453,223 EUR-2,221
FTSE 100Dailyn/a 10494.231,964 EUR-1,193
DAX 402 minn/a 42863.551,609 EUR-1,186
DAX 405 minn/a 69970.101,607 EUR-1,032
S&P 5001 hourn/a 17262.21776 EUR-508
Gold5 minn/a 2968.97446 EUR-104
FTSE 1002 minn/a 6651.52280 EUR-169
Gold4 hoursn/a 2166.67280 EUR-246
FTSE 1001 minn/a 4057.50202 EUR-195
Gold1 minn/a 955.56103 EUR-89.90

Charts

Results by run

Net profit against max drawdown

Net profitMax drawdown
0-5K-3K3K5KDAX 40 · 30 minSilver · 4 hoursDAX 40 · DailyDAX 40 · 1 hourFTSE 100 · DailyDAX 40 · 2 minDAX 40 · 5 minS&P 500 · 1 hourGold · 5 minFTSE 100 · 2 minGold · 4 hoursFTSE 100 · 1 minGold · 1 min

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.

// ============================================================
// Momentum Range Differential
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Long only
// Timeframe tested: 30 minutes
// ============================================================

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

// --- Parameters ---
positionSize = 1              // contracts per trade
takeProfitPoints = 43         // profit target in points
minBarsInTrade = 43           // earliest bar after entry that the trend exit may fire
momentumShortPeriod = 5       // short momentum length
momentumLongPeriod = 100      // long momentum length
rangeShortPeriod = 4          // short average range length
rangeLongPeriod = 100         // long average range length
momentumThreshold = 2         // minimum momentum differential to buy
rangeThreshold = 8.5          // minimum range differential to buy
fastPeriod = 18               // fast EMA length, must be rising to buy
slowPeriod = 53               // slow EMA length, falling slow EMA ends the trade

ONCE entryBar = 0             // bar index of the last entry

// --- Indicators ---
// Momentum differential: how much the short-term move outpaces the long-term one.
momentumShort = Momentum[momentumShortPeriod](close)
momentumLong = Momentum[momentumLongPeriod](close)
momentumDiff = MAX(ABS(momentumShort) - ABS(momentumLong), 0)

// Range differential: how much recent bars are wider than usual.
barRange = ABS(Range)
avgRangeLong = Average[MAX(1, rangeLongPeriod)](barRange)
avgRangeShort = Average[MAX(1, rangeShortPeriod)](barRange)
rangeDiff = MAX(0, avgRangeShort - avgRangeLong)

upBar = close > open
fastMA = ExponentialAverage[fastPeriod](close)
slowMA = ExponentialAverage[slowPeriod](close)

23 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • There is no stop loss. The trend exit only switches on after 43 bars, so a losing trade can run for a long time.
  • On DAX 40 30 minutes the max drawdown of EUR 4,212.3 was close to the EUR 4,949.2 profit.
  • High win rates (75.2% on the best run, 98.2% on DAX 40 Daily) come from a close target and no stop, which usually means a few large losses offset many small wins.
  • Only sweep data exists, so profit factor was not recorded. Some runs are tiny, such as 9 trades on Gold 1 minute.

Indicators used

MomentumEMA

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 it in ProOrder?

Yes, it is a long only ProOrder system with a points target. The rewritten code has not been compile checked yet.

How did it do on different markets?

All 12 listed runs were profitable, on DAX 40, FTSE 100, Gold, S&P 500 and Silver. Results beyond the DAX 40 were mostly small, for example EUR 776.36 on S&P 500 1 hour.

What drawdown should I size for at 1 contract?

The best run reached EUR 4,212.3 drawdown. With no stop, a single bad trade could exceed it.

Why 30 minute bars?

The 43 point target suits the typical DAX 40 move over a few 30 minute bars, and that timeframe gave the most trades, 1,512.

Related

Strategies like this one

Monday Dip Buy

Uses the same indicator.

n/a PF · 146 trades

Buy After Price Fall

Best run on the same market, DAX 40.

1.88 PF · 312 trades

Twelve Minus Two Momentum

Also a momentum strategy.

12.00 PF · 52 trades

Momentum traders, come compare notes. The ProRealAlgos waitlist is open.

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