Buys when price recovers above the lower Bollinger Band or the MACD histogram turns positive, long positions only. Exits when price breaks below the 20-period EMA or falls below a set level under the entry price.
Best run of 16. DAX 40, 30 min, spread 3, from run sweeps:2026-10-07-DAX40-30m-opt.tsv:16.
| Period | Up to 2026-10-07 |
| Instrument | DAX 40, 30 minutes |
| Spread | 3 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-07 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| DAX 40Best run | 30 min | n/a | 1,289 | 48.41 | 5,096 EUR | -2,482 |
| Nikkei 225 | Daily | n/a | 307 | 34.20 | 34,406 USD | -11,156 |
| Nasdaq 100 | Daily | n/a | 260 | 28.08 | 10,720 EUR | -3,580 |
| Dow Jones | Daily | n/a | 317 | 29.65 | 8,891 EUR | -6,593 |
| DAX 40 | 4 hours | n/a | 341 | 43.11 | 8,552 EUR | -2,747 |
| DAX 40 | Daily | n/a | 415 | 32.77 | 7,882 EUR | -3,728 |
| DAX 40 | 1 hour | n/a | 795 | 46.42 | 4,984 EUR | -3,755 |
| Dow Jones | 30 min | n/a | 463 | 49.24 | 4,981 EUR | -4,907 |
| Brent Crude | Daily | n/a | 160 | 30.00 | 4,487 EUR | -3,470 |
| US Crude Oil | 4 hours | n/a | 398 | 37.44 | 4,418 EUR | -3,957 |
| Nasdaq 100 | 30 min | n/a | 1,228 | 47.23 | 4,174 EUR | -2,380 |
| Nasdaq 100 | 1 hour | n/a | 832 | 44.35 | 3,516 EUR | -3,302 |
| S&P 500 | Daily | n/a | 313 | 27.80 | 1,695 EUR | -996 |
| Gold | Daily | n/a | 263 | 34.22 | 1,341 EUR | -477 |
| S&P 500 | 30 min | n/a | 1,229 | 50.04 | 1,264 EUR | -699 |
| Gold | 1 hour | n/a | 647 | 46.99 | 859 EUR | -549 |
Charts
Top 10 of 16 runs. The full list is in the table above.
The code
// ============================================================== // Lower Band Recovery With MACD // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long only // Timeframe tested: 30 minutes // ============================================================== DEFPARAM CumulateOrders = false emafast = ExponentialAverage[20](close) bbbasis = Average[200](close) bbdev = 2 * STD[200](close) bbupper = bbbasis + bbdev bblower = bbbasis - bbdev myMacd = ExponentialAverage[12](close) - ExponentialAverage[26](close) signal = ExponentialAverage[9](myMacd) delta = myMacd - signal thr = close * 0.33 / 100
23 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 16 market and timeframe combinations. The best run by trade count was DAX 40, 30 minutes, with 1,289 trades.
The best run had a maximum drawdown of 2,482 EUR at the tested position size, against a net result of 5,096 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.