Buys after a 4-bar MACD decline below zero with the close in the lowest 0.15 of the bar's range, and sells short after a 4-bar MACD rise above zero with the close above 0.85 of the range. Long trades exit when the close rises above the prior bar's high, short trades when it falls below the prior bar's low.
Best run of 3. USD/JPY, Daily, spread 1.4, from run pf:2026-10-10-USDJPY-D.tsv:35.
| Period | Up to 2026-10-10 |
| Instrument | USD/JPY, Daily |
| Spread | 1.4 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-10 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | 1.84 | 70 | 74.29 | 1,472 USD | -519 |
| US Crude Oil | Daily | 1.36 | 541 | 64.33 | 23,355 EUR | -10,783 |
| GBP/USD | Daily | 1.14 | 616 | 65.42 | 3,573 USD | -3,167 |
Charts
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // MACD Exhaustion Reversal (long and short) // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE capital = 10000
29 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 3 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.84 over 70 trades.
The best run had a maximum drawdown of 519 USD at the tested position size, against a net result of 1,472 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.