Join waitlist
Strategies / Momentum / MACD Histogram Momentum Long

MACD Histogram Momentum Long

The idea buys when the MACD histogram is above 0 and rises for 4 bars in a row. It sells the long when the positive histogram falls for 4 bars in a row.

MomentumLong onlySwingDow JonesDaily
1.99Profit factor
29,363Net profit EUR
62.99%Win rate
308Trades
-6,805Max drawdown
95.33Avg trade

Best run of 11. Dow Jones, Daily, spread 3, from run pf:2026-10-04-DOW30-D.tsv:9.

Entry rules, long

  1. No long position is open.

Exit rules

  1. The MACD histogram is above 0 and has fallen on each of the last 4 bars, closing the long.

Test conditions

PeriodUp to 2026-10-04
InstrumentDow Jones, 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-04

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Dow JonesBest runDaily1.99 30862.9929,363 EUR-6,805
Nikkei 225Dailyn/a 25361.6628,053 USD-25,219
Nikkei 2254 hoursn/a 56558.2326,805 USD-13,794
Nasdaq 100Dailyn/a 24562.0415,406 EUR-4,632
Nasdaq 1004 hoursn/a 70861.7212,401 EUR-4,784
DAX 40Dailyn/a 34259.369,882 EUR-5,018
Nasdaq 1001 hourn/a 2,62854.229,278 EUR-5,207
DAX 404 hoursn/a 68659.628,230 EUR-7,527
S&P 500Dailyn/a 32961.402,539 EUR-1,062
S&P 5004 hoursn/a 69362.052,241 EUR-1,357
S&P 5001 hourn/a 2,67656.351,472 EUR-1,385

Charts

Results by run

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

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// MACD Histogram Momentum Long
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Long only
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

myMacd = MACDline[12,26,9](close)
signal = ExponentialAverage[9](myMacd)
hist = myMacd - signal

13 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

MACDEMA
Longer historyRe-run on up to 1,000,000 barsDow Jones · Daily · older data 0.00 EUR

Dow Jones had no history beyond the standard run, so both runs used 14,000 bars.

Dow Jones · Daily

Bars available14,000
Net, standard 200,000-bar run29,362.90 EUR
Net, long run29,362.90 EUR
Net on the older data alone0.00 EUR
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 Histogram Momentum Long 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 11 market and timeframe combinations. The best run was Dow Jones, Daily, with a profit factor of 1.99 over 308 trades.

How large was the drawdown?

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

Turtle Trade

Best run on the same market, Dow Jones.

2.42 PF · 6,324 trades

Median Price MACD Histogram Long

Also a momentum strategy.

1.96 PF · 271 trades

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

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