Join waitlist
Strategies / Momentum / Rising MACD Histogram Long

Rising MACD Histogram Long

Buys when the MACD histogram has risen for two bars in a row. Closes the long when the histogram falls below its value from two bars earlier.

MomentumLong onlySwingGold4 hours
1.21Profit factor
2,948Net profit EUR
42.51%Win rate
2,712Trades
-677Max drawdown
1.09Avg trade

Best run of 8. Gold, 4 hours, spread 0.6, from run pf:2026-10-13-GOLD-4h.tsv:6.

Entry rules, long

Exit rules

  1. The histogram is below its value from two bars ago, and the long is closed.

Test conditions

PeriodUp to 2026-10-13
InstrumentGold, 4 hours
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-13

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest run4 hours1.21 2,71242.512,948 EUR-677
DAX 404 hours1.12 2,62244.9713,020 EUR-2,697
Nikkei 2254 hoursn/a 2,20042.8220,532 USD-14,119
Silver4 hoursn/a 2,71238.4218,590 USD-15,519
Dow JonesDailyn/a 1,27243.5516,720 EUR-10,659
DAX 40Dailyn/a 1,32841.578,196 EUR-4,872
Nasdaq 1004 hoursn/a 2,77641.646,882 EUR-5,002
Nasdaq 100Dailyn/a 1,00342.775,694 EUR-4,661

Charts

Results by run

Above 1.0 made money, below 1.0 lost money.

The code

ProBuilder code, as tested

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

DEFPARAM CumulateOrders = false

myMacd = ExponentialAverage[6](close) - ExponentialAverage[26](close)
signal = Average[9](myMacd)
hist = myMacd - signal

12 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

MACDEMASMA
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 Rising MACD Histogram 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 8 market and timeframe combinations. The best run was Gold, 4 hours, with a profit factor of 1.21 over 2,712 trades.

How large was the drawdown?

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

CCI Breakout

Best run on the same market, Gold.

1.08 PF · 6,065 trades

Reversal With Finite Volume Elements

Also a momentum strategy.

1.21 PF · 1,267 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