Join today
Strategies / Momentum / RSI Stochastic MA Cross

RSI Stochastic MA Cross

A 5 period SMA crossing the 10 period SMA starts the signal, but only if Stochastic %K is rising fast and RSI(14) agrees with the direction. Longs also need the 10 bar average of %K below 45, and shorts need it above 55. Trades aim for 50 points with a 1000 point stop.

MomentumLong & shortSwingEUR/USD4 hours
1.25Profit factor
91,809Net profit USD
73.26%Win rate
1,290Trades
-25,113Max drawdown
71.17Avg trade

Best run of 1. EUR/USD, 4 hours, spread 1, from run pf:2026-09-16-EURUSD-4h.tsv:1.

Entry rules, long

  1. The 5-period SMA crosses above the 10-period SMA
  2. Members only
  3. RSI(14) is above 45
  4. The 10-bar average of %K is below 45

Entry rules, short

  1. The 5-period SMA crosses below the 10-period SMA
  2. Members only
  3. RSI(14) is below 55
  4. The 10-bar average of %K is above 55

Exit rules

  1. Members only
  2. Stop loss of 1000 points
  3. An opposite signal reverses the position

Test conditions

PeriodUp to 2026-09-16
InstrumentEUR/USD, 4 hours
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-16

Parameters

positionSize
Contracts per trade
1
fastPeriod
Fast SMA length
5
slowPeriod
Slow SMA length
10
stochPeriod
Stochastic %K length
14
stochSmooth
Stochastic smoothing
3
stochSignalPeriod
SMA of %K used as its signal line
5
stochTrendPeriod
Slower SMA of %K for the stretch filter
10
stochMomentum
How far %K must lead its signal line
10
stochLongMax
Longs need the slow %K average below this
45
stochShortMin
Shorts need the slow %K average above this
55
rsiPeriod
RSI length
14
rsiLongLevel
Longs need RSI above this
45
rsiShortLevel
Shorts need RSI below this
55
takeProfitPoints
Profit target in points
50
stopLossPoints
Protective stop in points
1000

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
EUR/USDBest run4 hours1.25 1,29073.2691,809 USD-25,113

Charts

Results by run

Net profit against max drawdown

Net profitMax drawdown
0-50K-25K50K100KEUR/USD · 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.

// ============================================================
// RSI Stochastic MA Cross
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Long & short
// Timeframe tested: 4 hours
// ============================================================

// --- Settings ---
DEFPARAM CumulateOrders = false
DEFPARAM PreloadBars = 1000

// --- Parameters ---
positionSize = 1          // contracts per trade
fastPeriod = 5            // fast SMA
slowPeriod = 10           // slow SMA
stochPeriod = 14          // Stochastic %K length
stochSmooth = 3           // Stochastic smoothing
stochSignalPeriod = 5     // SMA of %K used as its signal line
stochTrendPeriod = 10     // slower SMA of %K for the not-stretched filter
stochMomentum = 10        // %K must lead its signal line by this much
stochLongMax = 45         // longs need the slow %K average below this
stochShortMin = 55        // shorts need the slow %K average above this
rsiPeriod = 14            // RSI length
rsiLongLevel = 45         // longs need RSI above this
rsiShortLevel = 55        // shorts need RSI below this
takeProfitPoints = 50     // profit target in points
stopLossPoints = 1000     // protective stop in points

// --- Indicators ---
fastMA = Average[fastPeriod](close)
slowMA = Average[slowPeriod](close)
stochK = Stochastic[stochPeriod, stochSmooth](close)
stochSignal = Average[stochSignalPeriod](stochK)
stochTrend = Average[stochTrendPeriod](stochK)
rsiValue = RSI[rsiPeriod](close)

20 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • The target (50 points) is tiny next to the stop (1000 points). A 73.26% win rate still gave a profit factor of only 1.25.
  • Only EUR/USD 4 hours was tested. There are no other markets on this page.

Indicators used

SMAStochasticRSI

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 ready for ProOrder?

Yes. The target, stop and reversal on opposite signals are all coded.

What markets was it tested on?

Only EUR/USD 4 hours: 91,809 USD over 1290 trades with a 25,113 USD drawdown.

How much risk per trade at 1 contract?

A single stopped trade can lose 1000 points while a winner makes 50. The worst drawdown in the test was 25,113 USD.

Why the 4 hour chart?

It was the only timeframe tested. The filters need several days of price action to line up, which fits 4 hour bars.

Related

Strategies like this one

Bollinger Squeeze

Uses the same indicator.

14.30 PF · 86 trades

Slow MACD Slope

Best run on the same market, EUR/USD.

6.80 PF · 7,305 trades

Pathfinder

A similar profit factor.

1.24 PF · 430 trades

Want to see which EUR/USD systems we actually trade? 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