Join waitlist
Strategies / Momentum / MACD Stochastic and RSI Filter

MACD Stochastic and RSI Filter

Buys when MACD is above its signal line, the 3 period SMA of stochastic %K is above 50 and RSI(14) is above 50. Sells when the MACD line falls below its signal line.

MomentumLong onlySwingDAX 404 hours
1.24Profit factor
14,113Net profit EUR
41.45%Win rate
1,059Trades
-2,824Max drawdown
13.33Avg trade

Best run of 17. DAX 40, 4 hours, spread 3, from run pf:2026-10-13-DAX40-4h.tsv:1.

Entry rules, long

  1. The 3 period SMA of 14 period stochastic %K is above 50.
  2. RSI(14) is above 50.

Exit rules

  1. The MACD line falls below its signal line and the long is closed.

Test conditions

PeriodUp to 2026-10-13
InstrumentDAX 40, 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-13

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
DAX 40Best run4 hours1.24 1,05941.4514,113 EUR-2,824
USD/JPYDailyn/a 44836.38712,300 USD-534,150
USD/JPY1 hourn/a 4,52137.69592,390 USD-189,940
USD/JPY4 hoursn/a 1,15441.25464,050 USD-238,900
SilverDailyn/a 40635.2231,480 USD-21,316
Nikkei 2254 hoursn/a 87439.2431,215 USD-9,875
Nikkei 225Dailyn/a 40741.5226,783 USD-10,262
Silver4 hoursn/a 1,03036.1220,465 USD-13,812
Dow JonesDailyn/a 54643.7713,836 EUR-6,990
DAX 40Dailyn/a 57641.8410,083 EUR-3,683
Nasdaq 1004 hoursn/a 1,13739.058,596 EUR-5,079
DAX 401 hourn/a 3,71438.886,983 EUR-3,547
Nasdaq 100Dailyn/a 43840.186,056 EUR-5,285
Gold4 hoursn/a 1,04941.092,689 EUR-794
GoldDailyn/a 46839.742,216 EUR-1,170
Gold1 hourn/a 3,95335.341,265 EUR-934
S&P 500Dailyn/a 57539.831,224 EUR-827

Charts

Results by run

Top 10 of 17 runs. The full list is in the table above.

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// MACD Stochastic and RSI Filter
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Long only
// Timeframe tested: 4 hours
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE raw = 50

myMacd = ExponentialAverage[12](close) - ExponentialAverage[26](close)
sig = ExponentialAverage[9](myMacd)
hh = highest[14](high)
ll = lowest[14](low)

17 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

MACDEMAStochasticSMARSI
Read this firstKnown weaknesses2 points
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run MACD Stochastic and RSI Filter 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 17 market and timeframe combinations. The best run was DAX 40, 4 hours, with a profit factor of 1.24 over 1,059 trades.

How large was the drawdown?

The best run had a maximum drawdown of 2,824 EUR at the tested position size, against a net result of 14,113 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

Heikin Ashi Color Flip

Best run on the same market, DAX 40.

1.12 PF · 3,692 trades

MACD Stochastic RSI Long Exit

Also a momentum strategy.

1.24 PF · 1,059 trades

Put your name on the ProRealAlgos waitlist to trade a tested portfolio instead of single strategies.

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