Join waitlist
Strategies / Trend / SMA Cross With RSI and MACD

SMA Cross With RSI and MACD

Buys when SMA(50) crosses above SMA(200), or when RSI(14) is below 30 and MACD crosses above its signal line. Sells on the opposite crossover, or when RSI(14) is above 70 with MACD crossing below its signal.

TrendLong onlySwingNikkei 2251 hour
1.55Profit factor
36,857Net profit USD
45.89%Win rate
316Trades
-6,422Max drawdown
117Avg trade

Best run of 44. Nikkei 225, 1 hour, spread 10, from run pf:2026-10-10-NIKKEI-1h.tsv:1.

Entry rules, long

  1. RSI(14) is below 30 and the MACD line (12, 26) crosses over its 9-period EMA signal line.
  2. Entries are only taken after bar 200 and only when flat.

Exit rules

  1. The position is also sold when RSI(14) is above 70 and the MACD line crosses under its 9-period EMA signal line.
  2. A 5% stop loss sits below the entry price and a 10% profit target sits above it.

Test conditions

PeriodUp to 2026-10-10
InstrumentNikkei 225, 1 hour
Spread10 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-10

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nikkei 225Best run1 hour1.55 31645.8936,857 USD-6,422
Gold3 min1.30 60838.491,805 EUR-404
USD/JPY10 minn/a 59245.10453,520 USD-155,150
USD/JPY15 minn/a 59341.65318,860 USD-200,140
EUR/USDDailyn/a 3842.1157,296 USD-22,966
EUR/USD2 minn/a 66129.9553,582 USD-14,485
Dow Jones4 hoursn/a 2864.2924,695 EUR-5,077
Nikkei 22515 minn/a 63642.1422,408 USD-8,559
EUR/USD3 minn/a 65531.7622,192 USD-14,504
Silver2 minn/a 62538.4020,019 USD-15,064
Dow Jones1 hourn/a 14049.2918,459 EUR-4,800
Silver4 hoursn/a 11341.5916,152 USD-5,550
Silver1 hourn/a 39338.1716,009 USD-7,306
Nikkei 2251 minn/a 61139.2815,508 USD-4,070
Silver3 minn/a 62435.7414,937 USD-11,349
Nikkei 2252 minn/a 62937.2014,088 USD-10,370
Dow JonesDailyn/a 4143.909,866 EUR-3,515
Nasdaq 1004 hoursn/a 9252.178,573 EUR-3,004
DAX 4010 minn/a 60341.138,526 EUR-2,587
Dow Jones30 minn/a 26943.498,409 EUR-8,132
Brent Crude10 minn/a 62841.888,196 EUR-3,183
DAX 4030 minn/a 66042.587,940 EUR-3,035
Nasdaq 10015 minn/a 59445.797,818 EUR-5,506
DAX 404 hoursn/a 9950.517,814 EUR-3,158
GBP/USDDailyn/a 4148.787,727 USD-2,742
Brent Crude15 minn/a 63540.316,810 EUR-3,467
Dow Jones5 minn/a 65637.966,567 EUR-5,325
Brent Crude4 hoursn/a 5250.006,033 EUR-2,070
US Crude Oil10 minn/a 58740.725,843 EUR-4,215
Nasdaq 1005 minn/a 64940.065,545 EUR-3,781
Nasdaq 1002 minn/a 59937.905,537 EUR-3,405
US Crude Oil4 hoursn/a 7347.954,781 EUR-2,735
Nasdaq 100Dailyn/a 3046.674,595 EUR-979
S&P 5004 hoursn/a 8756.323,554 EUR-592
Brent Crude2 minn/a 59836.453,117 EUR-2,143
FTSE 1004 hoursn/a 10042.002,876 EUR-2,395
S&P 500Dailyn/a 3271.882,842 EUR-392
Gold1 hourn/a 36942.012,398 EUR-743
Gold4 hoursn/a 10944.951,769 EUR-466
Gold5 minn/a 61138.301,626 EUR-745
Gold10 minn/a 62939.111,525 EUR-1,207
Gold2 minn/a 64436.341,119 EUR-609
S&P 5001 hourn/a 40544.941,045 EUR-807
GoldDailyn/a 3151.61711 EUR-315

Charts

Results by run

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

Above 1.0 made money, below 1.0 lost money.

The code

ProBuilder code, as tested

// ==============================================================
// SMA Cross With RSI and MACD
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long only
// Timeframe tested: 1 hour
// ==============================================================

DEFPARAM CumulateOrders = false

smafast = Average[50](close)
smaslow = Average[200](close)
myRsi = RSI[14](close)
macdl = MACDline[12,26,9](close)
signal = ExponentialAverage[9](macdl)

16 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

SMARSIMACD
Longer historyRe-run on up to 1,000,000 barsNikkei 225 · 1 hour · older data 0.00 USD

Nikkei 225 had no history beyond the standard run, so both runs used 90,000 bars.

Nikkei 225 · 1 hour

Bars available90,000
Net, standard 200,000-bar run36,857.00 USD
Net, long run36,857.00 USD
Net on the older data alone0.00 USD
Read this firstKnown weaknesses2 points
  • Results include the spread only. Commissions and overnight financing are not included.
  • The code is published as it was backtested and has not been compiled again since.

Questions

About this strategy

Can I run SMA Cross With RSI and MACD 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 44 market and timeframe combinations. The best run was Nikkei 225, 1 hour, with a profit factor of 1.55 over 316 trades.

How large was the drawdown?

The best run had a maximum drawdown of 6,422 USD at the tested position size, against a net result of 36,857 USD.

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

Rock Climber

Best run on the same market, Nikkei 225.

1.44 PF · 1,644 trades

Short EMA Crossover Trend

Also a trend strategy.

1.56 PF · 333 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