Join waitlist
Strategies / Momentum / MACD Crossover ATR Bracket

MACD Crossover ATR Bracket

The strategy goes long on a bullish MACD crossover and short on a bearish one, reversing any open position. Each trade uses a stop at the 14 period average true range and a profit target at that range multiplied by 3.0 twice.

MomentumLong & shortSwingUSD/JPYDaily
2.54Profit factor
163,740Net profit USD
18.01%Win rate
1,094Trades
-27,380Max drawdown
150Avg trade

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

Entry rules, long

  1. The histogram (MACD line minus signal) is above zero.

Entry rules, short

  1. The histogram is below zero.

Exit rules

  1. The stop is set at the 14 period average true range from the entry price.
  2. The profit target is set at 3.0 times 3.0 times the 14 period average true range from the entry price.

Test conditions

PeriodUp to 2026-10-10
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-10

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
USD/JPYBest runDaily2.54 1,09418.01163,740 USD-27,380
SilverDailyn/a 1,01424.8533,213 USD-13,234
US Crude Oil4 hoursn/a 1,83727.007,694 EUR-5,051
GoldDailyn/a 1,09626.921,546 EUR-757

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// MACD Crossover ATR Bracket
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Long & short
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

myMacd = ExponentialAverage[12](close) - ExponentialAverage[26](close)
sig = ExponentialAverage[9](myMacd)
hist = myMacd - sig
myAtr = AverageTrueRange[14](close)

14 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
Longer historyRe-run on up to 1,000,000 barsUSD/JPY · Daily · older data 0.00 USD

USD/JPY had no history beyond the standard run, so both runs used 12,000 bars.

USD/JPY · Daily

Bars available12,000
Net, standard 200,000-bar run163,740.00 USD
Net, long run163,740.00 USD
Net on the older data alone0.00 USD
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 Crossover ATR Bracket 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 4 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 2.54 over 1,094 trades.

How large was the drawdown?

The best run had a maximum drawdown of 27,380 USD at the tested position size, against a net result of 163,740 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

Smoothed MACD Turn With RSI

Also a momentum strategy.

2.60 PF · 5,812 trades

Want strategies that are already part of a live portfolio? Join the ProRealAlgos waitlist.

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