The strategy buys when the MACD histogram crosses above zero and sells short when it crosses below zero. Each trade carries a 5% stop loss from the entry price.
Best run of 7. EUR/USD, 3 min, spread 1, from run sweeps:2026-10-11-EURUSD-3m-opt.tsv:15.
| Period | Up to 2026-10-11 |
| Instrument | EUR/USD, 3 minutes |
| 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 |
|---|---|---|---|---|---|---|
| EUR/USDBest run | 3 min | n/a | 14,831 | 27.42 | 186,580 USD | -182,893 |
| USD/JPY | Daily | n/a | 944 | 36.65 | 1,549,710 USD | -683,810 |
| USD/JPY | 1 hour | n/a | 9,624 | 35.40 | 919,780 USD | -425,190 |
| USD/JPY | 4 hours | n/a | 2,478 | 37.45 | 407,650 USD | -323,080 |
| GBP/USD | Daily | n/a | 1,001 | 38.56 | 17,178 USD | -6,042 |
| Gold | Daily | n/a | 954 | 36.58 | 1,939 EUR | -1,104 |
| Gold | 4 hours | n/a | 2,202 | 36.42 | 1,707 EUR | -1,477 |
Charts
The code
// ============================================================== // MACD Histogram Zero Cross Percent Stop // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long & short // Timeframe tested: 3 minutes // ============================================================== DEFPARAM CumulateOrders = false myMacd = ExponentialAverage[12](close) - ExponentialAverage[26](close) signal = ExponentialAverage[12](myMacd) delta = myMacd - signal
11 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 7 market and timeframe combinations. The best run by trade count was EUR/USD, 3 minutes, with 14,831 trades.
The best run had a maximum drawdown of 182,893 USD at the tested position size, against a net result of 186,580 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.