Join waitlist
Strategies / Mean reversion / Lower Band Recovery With MACD

Lower Band Recovery With MACD

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.

Mean reversionLong onlyIntradayDAX 4030 min
n/aProfit factor
5,096Net profit EUR
48.41%Win rate
1,289Trades
-2,482Max drawdown
3.95Avg trade

Best run of 16. DAX 40, 30 min, spread 3, from run sweeps:2026-10-07-DAX40-30m-opt.tsv:16.

Entry rules, long

  1. Trigger two: the MACD histogram (12, 26, 9) crosses above zero while the close crosses above the lower band.
  2. Trigger three: the histogram crosses above zero, the low is above the 20-period EMA, and the prior close is below the current low.
  3. Trigger four: the histogram crosses above 0.33% of the close while the prior high is below the upper band.

Exit rules

  1. The close falls below the entry price divided by 1.01175734321249.

Test conditions

PeriodUp to 2026-10-07
InstrumentDAX 40, 30 minutes
Spread3 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-07

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
DAX 40Best run30 minn/a 1,28948.415,096 EUR-2,482
Nikkei 225Dailyn/a 30734.2034,406 USD-11,156
Nasdaq 100Dailyn/a 26028.0810,720 EUR-3,580
Dow JonesDailyn/a 31729.658,891 EUR-6,593
DAX 404 hoursn/a 34143.118,552 EUR-2,747
DAX 40Dailyn/a 41532.777,882 EUR-3,728
DAX 401 hourn/a 79546.424,984 EUR-3,755
Dow Jones30 minn/a 46349.244,981 EUR-4,907
Brent CrudeDailyn/a 16030.004,487 EUR-3,470
US Crude Oil4 hoursn/a 39837.444,418 EUR-3,957
Nasdaq 10030 minn/a 1,22847.234,174 EUR-2,380
Nasdaq 1001 hourn/a 83244.353,516 EUR-3,302
S&P 500Dailyn/a 31327.801,695 EUR-996
GoldDailyn/a 26334.221,341 EUR-477
S&P 50030 minn/a 1,22950.041,264 EUR-699
Gold1 hourn/a 64746.99859 EUR-549

Charts

Results by run

Top 10 of 16 runs. The full list is in the table above.

Net profitMax drawdown

The code

ProBuilder code, as tested

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

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

Bollinger BandsMACDEMASMAStandard Deviation
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.

Questions

About this strategy

Can I run Lower Band Recovery With MACD 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 16 market and timeframe combinations. The best run by trade count was DAX 40, 30 minutes, with 1,289 trades.

How large was the drawdown?

The best run had a maximum drawdown of 2,482 EUR at the tested position size, against a net result of 5,096 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

Heikin Ashi Color Flip

Best run on the same market, DAX 40.

1.12 PF · 3,692 trades

ATR Band

Also a mean reversion strategy.

10.31 PF · 53 trades

Get the full rules, the complete code and the ProRealAlgos portfolio as a member.

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