Join today
Strategies / Momentum / MA Slope Momentum

MA Slope Momentum

The system compares the 100-period SMA with its own value 20 bars earlier. A rising average means long and a falling one means short, and each new signal reverses the position. Once the first signal appears it is always in the market.

MomentumLong & shortSwingUSD/JPYDaily
2.11Profit factor
2,750,130Net profit JPY
42.86%Win rate
126Trades
-489,200Max drawdown
21,826Avg trade

Best run of 18. USD/JPY, Daily, spread 1, from run pf:2026-09-24-USDJPY-D.tsv:3.

Entry rules, long

  1. Members only

Entry rules, short

  1. Members only

Exit rules

  1. Members only

Test conditions

PeriodUp to 2026-09-25
InstrumentUSD/JPY, Daily
Spread1 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-25

Parameters

positionSize
Contracts per trade
1
trendPeriod
SMA length
100
slopeBars
Compare the SMA with its value this many bars ago
20

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
USD/JPYBest runDaily2.11 12642.862,750,130 JPY-489,200
EUR/USDDaily1.93 11140.54191,085 USD-37,073
USD/JPY10 minn/a 2,06235.21605,490 JPY-245,560
USD/JPY30 minn/a 2,02132.76469,990 JPY-236,850
USD/JPY5 minn/a 2,05534.06342,800 JPY-125,390
Silver2 minn/a 2,18433.0630,326 USD-16,261
GBP/USDDailyn/a 13241.6722,707 USD-9,529
US Crude OilDailyn/a 12733.8614,724 EUR-8,481
Nasdaq 100Dailyn/a 7638.1613,543 EUR-5,605
Brent Crude1 hourn/a 65033.857,580 EUR-4,611
Dow Jones5 minn/a 2,21032.177,374 EUR-6,770
GoldDailyn/a 13240.153,656 EUR-1,108
Gold10 minn/a 2,08733.113,242 EUR-990
Gold1 hourn/a 1,15134.322,967 EUR-1,164
Gold4 hoursn/a 34533.041,691 EUR-1,205
S&P 5004 hoursn/a 27537.821,342 EUR-1,325
Gold15 minn/a 2,10730.901,172 EUR-1,056
Gold2 minn/a 2,17632.351,161 EUR-827

Charts

Results by run

Profit factor by run

Above 1.0 made money, below 1.0 lost money.

0.00.61.31.92.51.0 = break-evenUSD/JPY · Daily2.11EUR/USD · Daily1.93

Net profit against max drawdown

Net profitMax drawdown
0-500K-250K2.5M5.0MUSD/JPY · DailyUSD/JPY · 10 minUSD/JPY · 30 minUSD/JPY · 5 minEUR/USD · DailySilver · 2 minGBP/USD · DailyUS Crude Oil · DailyNasdaq 100 · DailyBrent Crude · 1 hourDow Jones · 5 minGold · DailyGold · 10 minGold · 1 hourGold · 4 hoursS&P 500 · 4 hours

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.

// ============================================================
// MA Slope Momentum
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Long & short
// Timeframe tested: Daily
// ============================================================

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

// --- Parameters ---
positionSize = 1          // contracts per trade
trendPeriod = 100         // SMA length
slopeBars = 20            // compare the SMA with its value this many bars ago

// --- Indicators ---
trendMA = Average[trendPeriod](close)

14 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • No stop loss or target. The only exit is a reversal, so a trend change is paid for in full before the average turns.
  • The best run on USD/JPY Daily had only 126 trades and a win rate of 42.86%.
  • Max drawdown in that run was JPY 489,200 at 1 contract.
  • Profit factor was only recorded for USD/JPY Daily and EUR/USD Daily. The other rows are sweep data.

Indicators used

SMA

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

Is it suitable for ProOrder?

Yes, it is a stop-and-reverse system that ProOrder can run. The code was rewritten without a compile check, and the stats are from the version before that.

Which markets were tested?

Ten instruments from 2 minutes to Daily. EUR/USD Daily had a profit factor of 1.93 over 111 trades, and all rows were profitable.

What does being always in the market mean for risk?

At 1 contract, USD/JPY Daily had a max drawdown of JPY 489,200. There is no flat period, so overnight and weekend gaps always hit an open position.

Why Daily bars?

The two runs with a recorded profit factor were both Daily. On faster bars the 100 SMA slope flips more often and trade count rises sharply.

Related

Strategies like this one

Bollinger Squeeze

Uses the same indicator.

14.30 PF · 86 trades

Supertrend Counter Trend

Best run on the same market, USD/JPY.

3.47 PF · 1,444 trades

Cumulative RSI Pullback

A similar profit factor.

2.11 PF · 533 trades

Always-in systems need careful sizing. Learn how we handle it in the ProRealAlgos community.

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