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.
Best run of 4. USD/JPY, Daily, spread 1, from run pf:2026-10-10-USDJPY-D.tsv:15.
| Period | Up to 2026-10-10 |
| Instrument | USD/JPY, Daily |
| Spread | 1 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 | 2.54 | 1,094 | 18.01 | 163,740 USD | -27,380 |
| Silver | Daily | n/a | 1,014 | 24.85 | 33,213 USD | -13,234 |
| US Crude Oil | 4 hours | n/a | 1,837 | 27.00 | 7,694 EUR | -5,051 |
| Gold | Daily | n/a | 1,096 | 26.92 | 1,546 EUR | -757 |
Charts
The code
// ============================================================== // 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
USD/JPY had no history beyond the standard run, so both runs used 12,000 bars.
| Bars available | 12,000 |
| Net, standard 200,000-bar run | 163,740.00 USD |
| Net, long run | 163,740.00 USD |
| Net on the older data alone | 0.00 USD |
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 4 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 2.54 over 1,094 trades.
The best run had a maximum drawdown of 27,380 USD at the tested position size, against a net result of 163,740 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.