Join waitlist
Strategies / Mean reversion / Band Dip Anticipated MACD Cross

Band Dip Anticipated MACD Cross

The strategy buys when price dips below its 20-bar average minus the 20-bar ATR and MACD is rising toward its signal line. It exits when the close falls to a trailing level 2 times the 26-bar ATR below the highest close since entry.

Mean reversionLong onlyIntradayS&P 50030 min
n/aProfit factor
1,918Net profit EUR
36.66%Win rate
5,343Trades
-1,889Max drawdown
0.36Avg trade

Best run of 14. S&P 500, 30 min, spread 1, from run sweeps:2026-10-10-USA500-30m-opt.tsv:4.

Entry rules, long

  1. The touch flag switches on when the low falls below the 20-bar SMA minus the ATR(20) and off when the low exceeds the SMA.

Exit rules

  1. The trailing level is the highest close since entry minus 2 times the 26-bar ATR measured at the signal bar.

Test conditions

PeriodUp to 2026-10-10
InstrumentS&P 500, 30 minutes
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-11

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
S&P 500Best run30 minn/a 5,34336.661,918 EUR-1,889
Nikkei 2254 hoursn/a 77139.6927,777 USD-12,135
Dow JonesDailyn/a 42241.2324,863 EUR-9,887
Dow Jones30 minn/a 2,17837.6517,539 EUR-9,620
Nasdaq 1004 hoursn/a 90039.4417,536 EUR-4,782
Nasdaq 1001 hourn/a 3,36136.6316,584 EUR-5,019
DAX 40Dailyn/a 46240.9113,511 EUR-5,854
Nasdaq 100Dailyn/a 34537.9712,896 EUR-5,697
DAX 404 hoursn/a 91640.2812,863 EUR-5,515
Nasdaq 10030 minn/a 5,25736.507,678 EUR-6,474
S&P 500Dailyn/a 45639.253,806 EUR-1,657
GoldDailyn/a 42639.442,566 EUR-1,692
S&P 5004 hoursn/a 91941.352,107 EUR-1,250
Gold4 hoursn/a 90640.732,020 EUR-1,264

Charts

Results by run

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

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Band Dip Anticipated MACD Cross
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Mean reversion
// Direction: Long only
// Timeframe tested: 30 minutes
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE slbuf = 0
ONCE slp = 0
ONCE touched = 0

center = Average[20](close)
myMacd = ExponentialAverage[12](close) - ExponentialAverage[26](close)
sig = ExponentialAverage[9](myMacd)
buffer = AverageTrueRange[26](close) * 2

slp = MAX(slp, close - slbuf)
IF NOT LongOnMarket THEN
    slp = close - slbuf
ENDIF

25 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

SMAATRMACDEMA
Read this firstKnown weaknesses3 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 1,889 EUR is large next to the net profit of 1,918 EUR.
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.

Questions

About this strategy

Can I run Band Dip Anticipated MACD Cross 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 14 market and timeframe combinations. The best run by trade count was S&P 500, 30 minutes, with 5,343 trades.

How large was the drawdown?

The best run had a maximum drawdown of 1,889 EUR at the tested position size, against a net result of 1,918 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

CCI Sign With EMA Alignment

Best run on the same market, S&P 500.

1.23 PF · 1,253 trades

ATR Band

Also a mean reversion strategy.

10.31 PF · 53 trades

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

Copy trading on US indices is available to ProRealAlgos members as spots open.

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