The strategy buys when the MACD histogram crosses above zero while the MACD line is negative and price sits well above a 200 period EMA. It sells when the high or low falls below short and long period EMAs.
Best run of 4. EUR/USD, 3 min, spread 1, from run sweeps:2026-10-12-EURUSD-3m-opt.tsv:6.
| Period | Up to 2026-10-12 |
| 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-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| EUR/USDBest run | 3 min | n/a | 18 | 50.00 | 99,634 USD | -82,278 |
| EUR/USD | 5 min | n/a | 10 | 60.00 | 78,166 USD | -27,360 |
| US Crude Oil | 4 hours | n/a | 4 | 75.00 | 556 EUR | -248 |
| FTSE 100 | Daily | n/a | 1 | 100.00 | 154 EUR | -68.60 |
Charts
The code
// ============================================================== // MACD Histogram Zero Trend Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: 3 minutes // ============================================================== DEFPARAM CumulateOrders = false myMacd = ExponentialAverage[12](close) - ExponentialAverage[26](close) sig = ExponentialAverage[9](myMacd) delta = myMacd - sig ematrend = ExponentialAverage[200](close) emafast = ExponentialAverage[8](close) emamid = ExponentialAverage[100](close)
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 4 market and timeframe combinations. The best run by trade count was EUR/USD, 3 minutes, with 18 trades.
The best run had a maximum drawdown of 82,278 USD at the tested position size, against a net result of 99,634 USD.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.