Join waitlist
Strategies / Breakout / Band Midline and Upper Cross Long

Band Midline and Upper Cross Long

The system buys when price crosses above the middle of its Bollinger Bands or above the upper band, using 1.5 standard deviations. It sells when price crosses back below either the upper band or the middle line.

BreakoutLong onlySwingDAX 404 hours
n/aProfit factor
7,721Net profit EUR
37.42%Win rate
2,480Trades
-2,714Max drawdown
3.11Avg trade

Best run of 3. DAX 40, 4 hours, spread 3, from run sweeps:2026-10-11-DAX40-4h-opt.tsv:27.

Entry rules, long

Exit rules

  1. The long closes when the close crosses below the upper band or crosses below the 20-period average.

Test conditions

PeriodUp to 2026-10-11
InstrumentDAX 40, 4 hours
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-11

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
DAX 40Best run4 hoursn/a 2,48037.427,721 EUR-2,714
Nikkei 225Dailyn/a 1,00540.2033,468 USD-13,132
Dow JonesDailyn/a 1,38136.865,872 EUR-5,131

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Band Midline and Upper Cross Long
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Breakout
// Direction: Long only
// Timeframe tested: 4 hours
// ==============================================================

DEFPARAM CumulateOrders = false

basis = Average[20](close)
dev = 1.5 * STD[20](close)
upper = basis + dev

12 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 BandsSMAStandard 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 Band Midline and Upper Cross Long 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 3 market and timeframe combinations. The best run by trade count was DAX 40, 4 hours, with 2,480 trades.

How large was the drawdown?

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

Big Candle Breakout

Also a breakout strategy.

n/a PF · 4,636 trades

See how ProRealAlgos combines strategies like this into one automated portfolio.

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