Join waitlist
Strategies / Momentum / MACD Cross Filtered By SMA

MACD Cross Filtered By SMA

The idea buys when the MACD line crosses above its signal line while the 200-period SMA is not falling, and sells short on the mirror-image cross while it is falling. Opposite signals reverse, with a 0.5 percent stop and 1.5 percent target.

MomentumLong & shortIntradayGold10 min
n/aProfit factor
824Net profit EUR
29.37%Win rate
2,370Trades
-771Max drawdown
0.35Avg trade

Best run of 15. Gold, 10 min, spread 0.6, from run sweeps:2026-10-03-GOLD-10m-opt.tsv:14.

Entry rules, long

  1. Buys 1 contract at market when no long is open, with a 0.5 percent stop and 1.5 percent target

Entry rules, short

  1. Sells 1 contract short at market when no short is open, with a 0.5 percent stop and 1.5 percent target

Exit rules

  1. The 0.5 percent stop or 1.5 percent target closes the trade

Test conditions

PeriodUp to 2026-10-03
InstrumentGold, 10 minutes
Spread0.6 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-03

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest run10 minn/a 2,37029.37824 EUR-771
USD/JPY15 minn/a 1,69930.90368,560 USD-345,930
USD/JPY10 minn/a 1,64130.41307,530 USD-161,610
USD/JPY3 minn/a 1,38130.70240,860 USD-74,760
USD/JPY5 minn/a 1,48931.63222,230 USD-112,850
EUR/USD2 minn/a 1,61927.6180,726 USD-20,862
EUR/USD3 minn/a 1,64228.6243,681 USD-23,781
EUR/USDDailyn/a 52327.9230,496 USD-10,255
Nikkei 225Dailyn/a 45026.444,563 USD-3,978
Gold5 minn/a 2,01230.672,674 EUR-801
DAX 404 hoursn/a 1,13126.082,544 EUR-2,304
Nasdaq 100Dailyn/a 45919.831,968 EUR-1,440
Gold4 hoursn/a 1,13826.981,243 EUR-478
Gold3 minn/a 1,91729.891,218 EUR-994
Brent CrudeDailyn/a 20626.70810 EUR-714

Charts

Results by run

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

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// MACD Cross Filtered By SMA
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Long & short
// Timeframe tested: 10 minutes
// ==============================================================

DEFPARAM CumulateOrders = false

myMacd = MACDline[12,26,9](close)
signal = ExponentialAverage[9](myMacd)
sma = Average[200](close)

18 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

MACDSMA
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 771 EUR is large next to the net profit of 824 EUR.

Questions

About this strategy

Can I run MACD Cross Filtered By SMA 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 15 market and timeframe combinations. The best run by trade count was Gold, 10 minutes, with 2,370 trades.

How large was the drawdown?

The best run had a maximum drawdown of 771 EUR at the tested position size, against a net result of 824 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

CCI Breakout

Best run on the same market, Gold.

1.08 PF · 6,065 trades

ATR Momentum

Also a momentum strategy.

n/a PF · 15,021 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