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.
Best run of 11. Dow Jones, Daily, spread 3, from run pf:2026-10-04-DOW30-D.tsv:9.
| Period | Up to 2026-10-04 |
| Instrument | Dow Jones, Daily |
| Spread | 3 points |
| Starting capital | 1,000,000 |
| Costs | Spread only. Commissions and overnight financing are not included. |
| Bars | Up to 200,000 bars, fewer where the instrument has less history |
| Last tested | 2026-10-04 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| Dow JonesBest run | Daily | 1.99 | 308 | 62.99 | 29,363 EUR | -6,805 |
| Nikkei 225 | Daily | n/a | 253 | 61.66 | 28,053 USD | -25,219 |
| Nikkei 225 | 4 hours | n/a | 565 | 58.23 | 26,805 USD | -13,794 |
| Nasdaq 100 | Daily | n/a | 245 | 62.04 | 15,406 EUR | -4,632 |
| Nasdaq 100 | 4 hours | n/a | 708 | 61.72 | 12,401 EUR | -4,784 |
| DAX 40 | Daily | n/a | 342 | 59.36 | 9,882 EUR | -5,018 |
| Nasdaq 100 | 1 hour | n/a | 2,628 | 54.22 | 9,278 EUR | -5,207 |
| DAX 40 | 4 hours | n/a | 686 | 59.62 | 8,230 EUR | -7,527 |
| S&P 500 | Daily | n/a | 329 | 61.40 | 2,539 EUR | -1,062 |
| S&P 500 | 4 hours | n/a | 693 | 62.05 | 2,241 EUR | -1,357 |
| S&P 500 | 1 hour | n/a | 2,676 | 56.35 | 1,472 EUR | -1,385 |
Charts
Top 10 of 11 runs. The full list is in the table above.
The code
// ============================================================== // 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
Dow Jones had no history beyond the standard run, so both runs used 14,000 bars.
| Bars available | 14,000 |
| Net, standard 200,000-bar run | 29,362.90 EUR |
| Net, long run | 29,362.90 EUR |
| Net on the older data alone | 0.00 EUR |
Questions
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.
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.
The best run had a maximum drawdown of 6,805 EUR at the tested position size, against a net result of 29,363 EUR.
It only takes long trades.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.