Join waitlist
Strategies / Momentum / MACD Histogram Zero Cross Percent Stop

MACD Histogram Zero Cross Percent Stop

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.

MomentumLong & shortIntradayEUR/USD3 min
n/aProfit factor
186,580Net profit USD
27.42%Win rate
14,831Trades
-182,893Max drawdown
12.58Avg trade

Best run of 7. EUR/USD, 3 min, spread 1, from run sweeps:2026-10-11-EURUSD-3m-opt.tsv:15.

Entry rules, long

  1. The MACD histogram (12 and 26 period EMA difference, minus its 12 period EMA signal) crosses above zero.

Entry rules, short

  1. The MACD histogram crosses below zero.

Exit rules

  1. A stop loss sits 5% from the entry price.

Test conditions

PeriodUp to 2026-10-11
InstrumentEUR/USD, 3 minutes
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-11

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
EUR/USDBest run3 minn/a 14,83127.42186,580 USD-182,893
USD/JPYDailyn/a 94436.651,549,710 USD-683,810
USD/JPY1 hourn/a 9,62435.40919,780 USD-425,190
USD/JPY4 hoursn/a 2,47837.45407,650 USD-323,080
GBP/USDDailyn/a 1,00138.5617,178 USD-6,042
GoldDailyn/a 95436.581,939 EUR-1,104
Gold4 hoursn/a 2,20236.421,707 EUR-1,477

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

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

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

MACDEMA
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 182,893 USD is large next to the net profit of 186,580 USD.

Questions

About this strategy

Can I run MACD Histogram Zero Cross Percent Stop 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 7 market and timeframe combinations. The best run by trade count was EUR/USD, 3 minutes, with 14,831 trades.

How large was the drawdown?

The best run had a maximum drawdown of 182,893 USD at the tested position size, against a net result of 186,580 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

Stochastic Crossover Long With Bracket

Best run on the same market, EUR/USD.

1.75 PF · 5,666 trades

ATR Momentum

Also a momentum strategy.

n/a PF · 15,021 trades

See how ProRealAlgos combines strategies like this into one automated portfolio.

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