Buys when MACD crosses above its signal line or the close crosses above a lower regression band. Sells when MACD crosses below its signal line or the close crosses below an upper band.
Best run of 17. USD/JPY, 1 hour, spread 1, from run sweeps:2026-10-11-USDJPY-1h-opt.tsv:6.
| Period | Up to 2026-10-11 |
| Instrument | USD/JPY, 1 hour |
| 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-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | 1 hour | n/a | 5,291 | 36.65 | 331,130 USD | -305,370 |
| USD/JPY | 4 hours | n/a | 1,267 | 39.78 | 569,960 USD | -240,860 |
| Nikkei 225 | 4 hours | n/a | 903 | 38.54 | 28,572 USD | -9,172 |
| Silver | Daily | n/a | 407 | 34.40 | 28,129 USD | -24,488 |
| Nikkei 225 | Daily | n/a | 358 | 40.50 | 18,989 USD | -9,235 |
| Dow Jones | Daily | n/a | 485 | 44.95 | 18,244 EUR | -6,472 |
| Nasdaq 100 | 4 hours | n/a | 1,177 | 38.23 | 11,948 EUR | -4,953 |
| DAX 40 | 4 hours | n/a | 1,117 | 39.30 | 11,734 EUR | -3,258 |
| DAX 40 | Daily | n/a | 536 | 41.04 | 10,239 EUR | -4,530 |
| DAX 40 | 1 hour | n/a | 4,202 | 37.39 | 9,253 EUR | -4,557 |
| Nasdaq 100 | Daily | n/a | 366 | 41.53 | 8,666 EUR | -5,131 |
| Brent Crude | 4 hours | n/a | 596 | 40.44 | 5,864 EUR | -4,802 |
| Gold | 4 hours | n/a | 1,134 | 38.62 | 2,520 EUR | -744 |
| S&P 500 | Daily | n/a | 514 | 40.86 | 2,164 EUR | -1,016 |
| Gold | Daily | n/a | 454 | 35.90 | 2,081 EUR | -1,305 |
| S&P 500 | 4 hours | n/a | 1,179 | 38.42 | 1,588 EUR | -1,033 |
| Gold | 1 hour | n/a | 4,553 | 34.94 | 1,541 EUR | -1,254 |
Charts
Top 10 of 17 runs. The full list is in the table above.
The code
// ============================================================== // MACD Linear Regression Band Long // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long only // Timeframe tested: 1 hour // ============================================================== DEFPARAM CumulateOrders = false myMacd = MACDline[12,26,9](close) signal = ExponentialAverage[9](myMacd) lin = LinearRegression[2646](close) sd = STD[2646](close) upper = lin + sd lower = lin - sd
13 more lines: the entry and exit rules.
Setup
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 17 market and timeframe combinations. The best run by trade count was USD/JPY, 1 hour, with 5,291 trades.
The best run had a maximum drawdown of 305,370 USD at the tested position size, against a net result of 331,130 USD.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.