Join waitlist
Strategies / Mean reversion / MACD Exhaustion Reversal (long and short)

MACD Exhaustion Reversal (long and short)

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.

Mean reversionLong & shortSwingUSD/JPYDaily
1.84Profit factor
1,472Net profit USD
74.29%Win rate
70Trades
-519Max drawdown
21.03Avg trade

Best run of 3. USD/JPY, Daily, spread 1.4, from run pf:2026-10-10-USDJPY-D.tsv:35.

Entry rules, long

  1. The MACD line is below 0
  2. (Close minus low) divided by the bar's range is below 0.15

Entry rules, short

  1. The MACD line is above 0
  2. (Close minus low) divided by the bar's range is above 0.85

Exit rules

  1. The close falls below the prior bar's low, closing a short

Test conditions

PeriodUp to 2026-10-10
InstrumentUSD/JPY, Daily
Spread1.4 points
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-10-10

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
USD/JPYBest runDaily1.84 7074.291,472 USD-519
US Crude OilDaily1.36 54164.3323,355 EUR-10,783
GBP/USDDaily1.14 61665.423,573 USD-3,167

Charts

Results by run

Above 1.0 made money, below 1.0 lost money.

The code

ProBuilder code, as tested

// ==============================================================
// 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

How to load it

  1. Copy the code with the copy button on the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Indicators used

MACD
Read this firstKnown weaknesses2 points
  • The best run has only 70 trades, which is a small sample to judge it on.
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.

Questions

About this strategy

Can I run MACD Exhaustion Reversal (long and short) in ProOrder?

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.

Which markets was it tested on?

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.

How large was the drawdown?

The best run had a maximum drawdown of 519 USD at the tested position size, against a net result of 1,472 USD.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Slow MACD Slope

Uses the same indicator.

6.80 PF · 7,305 trades

Trend Surfer

Best run on the same market, USD/JPY.

1.04 PF · 10,813 trades

Slow Stochastic Level Cross

Also a mean reversion strategy.

1.84 PF · 378 trades

Put your name on the ProRealAlgos waitlist to trade a tested portfolio instead of single strategies.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs