Join waitlist
Strategies / Trend / Trend Filter MACD Drop Exit

Trend Filter MACD Drop Exit

The system buys when the close is above a 120-period weighted moving average and the MACD histogram is positive. It sells when the close falls to 0.97 times the higher of the last two closes.

TrendLong onlySwingNasdaq 100Daily
2.82Profit factor
22,426Net profit EUR
54.46%Win rate
112Trades
-4,605Max drawdown
200Avg trade

Best run of 69. Nasdaq 100, Daily, spread 3, from run pf:2026-10-11-NAS100-D.tsv:5.

Entry rules, long

  1. The MACD histogram, using 10 and 20 period EMAs and a 10-period signal, is above zero.

Exit rules

  1. No stop loss or profit target is set.

Test conditions

PeriodUp to 2026-10-11
InstrumentNasdaq 100, Daily
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-11

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nasdaq 100Best runDaily2.82 11254.4622,426 EUR-4,605
USD/JPY30 minn/a 1100.00769,170 USD-260,990
USD/JPY4 hoursn/a 475.00549,470 USD-483,860
USD/JPY1 hourn/a 1100.00511,220 USD-484,160
USD/JPY10 minn/a 1100.00481,870 USD-246,630
USD/JPY15 minn/a 1100.00459,230 USD-245,400
EUR/USD10 minn/a 3237.5070,051 USD-54,674
Nikkei 225Dailyn/a 8148.1556,987 USD-18,522
Nikkei 22530 minn/a 1346.1553,877 USD-12,879
Nikkei 2251 hourn/a 1450.0053,327 USD-14,317
Nikkei 2254 hoursn/a 1957.8950,457 USD-11,865
Nikkei 22515 minn/a 850.0044,325 USD-13,076
Dow JonesDailyn/a 4456.8239,671 EUR-8,722
Nikkei 22510 minn/a 683.3336,934 USD-13,088
Nikkei 2255 minn/a 366.6731,989 USD-13,126
Nikkei 2253 minn/a 250.0029,851 USD-13,081
Nasdaq 1001 hourn/a 1942.1128,649 EUR-5,931
Nasdaq 1004 hoursn/a 2661.5428,101 EUR-5,748
Nasdaq 10030 minn/a 1060.0027,040 EUR-6,545
Dow Jones4 hoursn/a 475.0026,106 EUR-11,463
Nikkei 2252 minn/a 1100.0025,347 USD-13,121
Silver10 minn/a 1154.5525,269 USD-22,186
Nasdaq 10015 minn/a 1060.0021,731 EUR-6,462
Dow Jones30 minn/a 540.0021,127 EUR-11,695
Dow Jones1 hourn/a 742.8620,717 EUR-10,640
Dow Jones15 minn/a 742.8620,230 EUR-12,222
DAX 404 hoursn/a 2339.1319,413 EUR-4,461
DAX 4030 minn/a 862.5018,145 EUR-5,531
Dow Jones10 minn/a 2100.0017,038 EUR-8,868
Nasdaq 10010 minn/a 771.4316,810 EUR-6,629
Nikkei 2251 minn/a 1100.0016,198 USD-13,148
DAX 401 hourn/a 2040.0016,032 EUR-6,210
Dow Jones5 minn/a 250.0013,856 EUR-8,817
Nasdaq 1005 minn/a 250.0013,619 EUR-6,056
DAX 40Dailyn/a 9347.3113,090 EUR-5,885
DAX 4015 minn/a 540.0012,544 EUR-5,308
DAX 4010 minn/a 2100.009,937 EUR-4,474
Nasdaq 1003 minn/a 250.008,585 EUR-6,101
DAX 405 minn/a 2100.008,089 EUR-4,941
Nasdaq 1002 minn/a 1100.007,164 EUR-3,756
Nasdaq 1001 minn/a 1100.006,885 EUR-3,760
S&P 5004 hoursn/a 1656.256,447 EUR-1,301
S&P 50030 minn/a 560.006,335 EUR-1,521
Dow Jones2 minn/a 1100.006,223 EUR-5,676
S&P 5001 hourn/a 1540.006,013 EUR-1,616
Dow Jones1 minn/a 1100.005,382 EUR-4,166
S&P 500Dailyn/a 5360.385,295 EUR-1,300
FTSE 1004 hoursn/a 1643.754,795 EUR-3,880
S&P 50015 minn/a 757.144,679 EUR-1,448
FTSE 10030 minn/a 837.504,238 EUR-3,167
FTSE 1001 hourn/a 1747.064,045 EUR-3,346
Gold1 hourn/a 666.673,690 EUR-1,445
S&P 50010 minn/a 3100.003,580 EUR-1,346
GoldDailyn/a 10153.473,560 EUR-1,393
FTSE 10010 minn/a 2100.003,383 EUR-1,494
FTSE 1005 minn/a 1100.003,100 EUR-1,320
Gold4 hoursn/a 1850.003,054 EUR-1,937
S&P 5005 minn/a 2100.003,004 EUR-1,406
FTSE 10015 minn/a 633.332,792 EUR-2,690
Gold30 minn/a 560.002,538 EUR-2,063
Gold15 minn/a 450.002,535 EUR-1,902
Gold10 minn/a 1100.002,372 EUR-1,629
DAX 401 minn/a 1100.002,291 EUR-1,831
Gold5 minn/a 1100.002,205 EUR-1,631
FTSE 1003 minn/a 250.001,772 EUR-1,485
S&P 5003 minn/a 250.001,563 EUR-1,434
FTSE 1002 minn/a 1100.001,342 EUR-1,265
S&P 5002 minn/a 1100.001,299 EUR-699
S&P 5001 minn/a 1100.001,213 EUR-396

Charts

Results by run

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

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Trend Filter MACD Drop Exit
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long only
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

myMacd = ExponentialAverage[10](close) - ExponentialAverage[20](close)
signal = ExponentialAverage[10](myMacd)
hist = myMacd - signal
wma = WeightedAverage[120](close)
sl = MAX(close * 0.97, close[1] * 0.97)

10 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

WMAMACDEMA
Longer historyRe-run on up to 1,000,000 barsNasdaq 100 · Daily · older data 0.00 EUR

Nasdaq 100 had no history beyond the standard run, so both runs used 10,000 bars.

Nasdaq 100 · Daily

Bars available10,000
Net, standard 200,000-bar run22,426.10 EUR
Net, long run22,426.10 EUR
Net on the older data alone0.00 EUR
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 Trend Filter MACD Drop Exit 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 69 market and timeframe combinations. The best run was Nasdaq 100, Daily, with a profit factor of 2.82 over 112 trades.

How large was the drawdown?

The best run had a maximum drawdown of 4,605 EUR at the tested position size, against a net result of 22,426 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Slow MACD Slope

Uses the same indicator.

6.80 PF · 7,305 trades

Volatility Spike Regression Long

Best run on the same market, Nasdaq 100.

1.22 PF · 1,850 trades

Double Supertrend Long

Also a trend strategy.

2.81 PF · 104 trades

Want strategies that are already part of a live portfolio? Join the ProRealAlgos waitlist.

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