The strategy buys when the histogram of a logarithmic MACD crosses above zero and sells when it crosses back below zero. It trades only long, using the log ratio of fast and slow averages rather than raw price differences.
Best run of 16. USD/JPY, 1 hour, spread 1, from run sweeps:2026-10-11-USDJPY-1h-opt.tsv:5.
| Period | Up to 2026-10-11 |
| Instrument | USD/JPY, 1 hour |
| Spread | 1 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-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | 1 hour | n/a | 5,402 | 35.89 | 406,600 USD | -337,090 |
| USD/JPY | 4 hours | n/a | 1,368 | 39.40 | 626,830 USD | -228,870 |
| Nikkei 225 | Daily | n/a | 443 | 40.63 | 32,780 USD | -9,130 |
| Nikkei 225 | 4 hours | n/a | 1,003 | 37.39 | 30,828 USD | -10,395 |
| Dow Jones | Daily | n/a | 590 | 41.86 | 20,131 EUR | -6,660 |
| DAX 40 | Daily | n/a | 634 | 40.22 | 12,698 EUR | -4,007 |
| DAX 40 | 1 hour | n/a | 4,284 | 37.54 | 12,265 EUR | -3,430 |
| Nasdaq 100 | 4 hours | n/a | 1,268 | 38.41 | 11,808 EUR | -4,623 |
| DAX 40 | 4 hours | n/a | 1,220 | 38.93 | 11,547 EUR | -3,254 |
| Nasdaq 100 | Daily | n/a | 472 | 38.35 | 8,004 EUR | -5,494 |
| Nasdaq 100 | 1 hour | n/a | 4,685 | 35.62 | 6,706 EUR | -6,254 |
| Gold | Daily | n/a | 543 | 37.20 | 2,773 EUR | -1,424 |
| Gold | 4 hours | n/a | 1,237 | 38.72 | 2,408 EUR | -865 |
| S&P 500 | Daily | n/a | 604 | 39.07 | 2,134 EUR | -961 |
| S&P 500 | 4 hours | n/a | 1,272 | 38.84 | 1,676 EUR | -1,102 |
| Gold | 1 hour | n/a | 4,663 | 34.53 | 1,566 EUR | -1,081 |
Charts
Top 10 of 16 runs. The full list is in the table above.
The code
// ============================================================== // Log MACD Histogram Zero Cross // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long only // Timeframe tested: 1 hour // ============================================================== DEFPARAM CumulateOrders = false fast = ExponentialAverage[12](close) slow = ExponentialAverage[26](close) lmacd = LOG(fast) - LOG(slow) signal = ExponentialAverage[9](lmacd) hist = lmacd - signal
10 more lines: the entry and exit rules.
Setup
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 16 market and timeframe combinations. The best run by trade count was USD/JPY, 1 hour, with 5,402 trades.
The best run had a maximum drawdown of 337,090 USD at the tested position size, against a net result of 406,600 USD.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.