Join waitlist
Strategies / Momentum / MACD And Stochastic RSI Reversal

MACD And Stochastic RSI Reversal

Buys when a MACD-based line crosses above a small negative threshold or RSI(4) crosses above 30, with smoothed stochastic RSI below 57. Sells short when that line crosses below 0, or when the price-to-average gap crosses below its threshold with stochastic RSI above 57.

MomentumLong & shortSwingNasdaq 1004 hours
n/aProfit factor
12,125Net profit EUR
45.67%Win rate
2,886Trades
-8,198Max drawdown
4.20Avg trade

Best run of 1. Nasdaq 100, 4 hours, spread 3, from run sweeps:2026-10-12-NAS100-4h-opt.tsv:14.

Entry rules, long

  1. The 4 bar average of an 8 bar stochastic of RSI(4) is below 57.

Entry rules, short

  1. Or the close minus the 14 bar average of OHLC4 crosses below -0.01% of the close, with the smoothed stochastic above 57.

Exit rules

  1. A 5% stop loss from the fill price applies to both long and short trades.

Test conditions

PeriodUp to 2026-10-12
InstrumentNasdaq 100, 4 hours
Spread3 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-12

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nasdaq 100Best run4 hoursn/a 2,88645.6712,125 EUR-8,198

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

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

DEFPARAM CumulateOrders = false

ONCE stk = 50

myMacd = ExponentialAverage[11](close) - ExponentialAverage[18](close)
amacd = ExponentialAverage[6](myMacd)
delta = myMacd - amacd

rs = RSI[4](close)
rhh = highest[8](rs)
rll = lowest[8](rs)

24 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

EMAMACDRSIStochasticSMA
Read this firstKnown weaknesses3 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 8,198 EUR is large next to the net profit of 12,125 EUR.
  • It was only tested on Nasdaq 100, so there is no evidence from other markets.

Questions

About this strategy

Can I run MACD And Stochastic RSI Reversal 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 one combination, Nasdaq 100, 4 hours, with 2,886 trades.

How large was the drawdown?

The best run had a maximum drawdown of 8,198 EUR at the tested position size, against a net result of 12,125 EUR.

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

Volatility Spike Regression Long

Best run on the same market, Nasdaq 100.

1.22 PF · 1,850 trades

ATR Momentum

Also a momentum strategy.

n/a PF · 15,021 trades

Get the full rules, the complete code and the ProRealAlgos portfolio as a member.

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