Join waitlist
Strategies / Momentum / MACD Histogram Zero Cross Reversal

MACD Histogram Zero Cross Reversal

The strategy goes long when the MACD histogram crosses above zero and short when it crosses below zero, reversing any open position. Each trade uses a stop loss 1.25 times the 2 period average true range.

MomentumLong & shortSwingUSD/JPYDaily
9.12Profit factor
1,149,270Net profit USD
1.46%Win rate
893Trades
-133,510Max drawdown
1,287Avg trade

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

Entry rules, long

  1. The position is not already long.

Entry rules, short

  1. The position is not already short.

Exit rules

  1. A stop loss sits 1.25 times the 2 period average true range from the entry price.

Test conditions

PeriodUp to 2026-10-12
InstrumentUSD/JPY, Daily
Spread1 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-12

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
USD/JPYBest runDaily9.12 8931.461,149,270 USD-133,510
Silver4 hoursn/a 2,03226.5733,074 USD-20,413
Gold4 hoursn/a 2,03628.882,350 EUR-1,439

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// MACD Histogram Zero Cross Reversal
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Long & short
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

myMacd = ExponentialAverage[13](close) - ExponentialAverage[30](close)
signal = ExponentialAverage[12](myMacd)
delta = myMacd - signal
myAtr = AverageTrueRange[2](close)

13 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

MACDEMAATR
Read this firstKnown weaknesses2 points
  • Results include the spread only. Commissions and overnight financing are not included.
  • The code is published as it was backtested and has not been compiled again since.

Questions

About this strategy

Can I run MACD Histogram Zero Cross Reversal 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 9.12 over 893 trades.

How large was the drawdown?

The best run had a maximum drawdown of 133,510 USD at the tested position size, against a net result of 1,149,270 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

Linear Regression Momentum Pivot

Also a momentum strategy.

9.58 PF · 1,606 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