Join today
Strategies / Volatility / Universal Bollinger

Universal Bollinger: Breakout or Re-entry Depending on Trend

Universal Bollinger uses custom exponential bands on log price (42 periods, 1.618 deviations) and a 100 SMA trend filter. Above the SMA it buys strong breakouts confirmed by RSI(2), and below it buys a close back inside the lower band, with mirrored rules for shorts. Positions close on a sharp ATR(2) move with RSI(2) at an extreme, or reverse on an opposite signal.

VolatilityLong & shortIntradayNikkei 22510 min
n/aProfit factor
27,728Net profit USD
37.84%Win rate
3,898Trades
-16,037Max drawdown
7.11Avg trade

Best run of 11. Nikkei 225, 10 min, spread 10, from run sweeps:2026-09-26-NIKKEI-10m-opt.tsv:2.

Entry rules, long

  1. Members only
  2. Or below the 100 SMA: previous close below the lower band, close back above it, RSI(2) above 50

Entry rules, short

  1. Members only
  2. Or above the 100 SMA: previous close above the upper band, close back below it, RSI(2) below 50

Exit rules

  1. Members only
  2. Close a short when the close rises more than ATR(2) above the previous close and RSI(2) is above 95
  3. An opposite entry signal reverses the position
  4. No stop loss or target

Test conditions

PeriodUp to 2026-09-26
InstrumentNikkei 225, 10 minutes
Spread10 points
Contracts1
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-09-26

Parameters

positionSize
Contracts per trade
1
bandPeriod
Length of the exponential bands
42
bandWidth
Band distance in standard deviations
1.618
seedPeriod
SMA used to seed the bands on the first bars
3
trendPeriod
SMA trend filter length
100
rsiPeriod
RSI length
2
atrPeriod
ATR length for the exit
2
breakoutRsiLong
RSI above this confirms an upside band break
70
breakoutRsiShort
RSI below this confirms a downside band break
40
reentryRsiLevel
RSI side needed when price falls back inside a band
50
longExitRsi
Long exit needs RSI below this
5
shortExitRsi
Short exit needs RSI above this
95

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nikkei 225Best run10 minn/a 3,89837.8427,728 USD-16,037
EUR/USD4 hoursn/a 68141.8580,338 USD-62,580
Dow JonesDailyn/a 19841.9218,228 EUR-8,765
SilverDailyn/a 24734.0116,417 USD-12,212
Nasdaq 100Dailyn/a 16638.5515,964 EUR-4,641
Dow Jones1 hourn/a 71540.0012,870 EUR-9,986
Nasdaq 1001 hourn/a 2,05036.6812,343 EUR-7,675
Dow Jones4 hoursn/a 18741.7111,226 EUR-6,553
GoldDailyn/a 25434.652,528 EUR-1,282
S&P 50030 minn/a 3,75739.132,285 EUR-1,459
Gold4 hoursn/a 52440.841,609 EUR-1,174

Charts

Results by run

Net profit against max drawdown

Net profitMax drawdown
0-100K-50K50K100KEUR/USD · 4 hoursNikkei 225 · 10 minDow Jones · DailySilver · DailyNasdaq 100 · DailyDow Jones · 1 hourNasdaq 100 · 1 hourDow Jones · 4 hoursGold · DailyS&P 500 · 30 minGold · 4 hours

The code

ProBuilder, rewritten to house standard

Every file in the library uses the same header, the same section order and the same variable names. The numbers above were produced by the original version before the rewrite, and the rewrite has not yet been compiled in ProRealTime.

// ============================================================
// Universal Bollinger
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Volatility
// Direction: Long & short
// Timeframe tested: 10 minutes
// ============================================================

// --- Settings ---
DEFPARAM CumulateOrders = false

// --- Parameters ---
positionSize = 1          // contracts per trade
bandPeriod = 42           // length of the exponential bands
bandWidth = 1.618         // band distance in standard deviations
seedPeriod = 3            // SMA used to seed the bands on the first bars
trendPeriod = 100         // SMA trend filter length
rsiPeriod = 2             // RSI length
atrPeriod = 2             // ATR length for the exit
breakoutRsiLong = 70      // RSI above this confirms an upside band break
breakoutRsiShort = 40     // RSI below this confirms a downside band break
reentryRsiLevel = 50      // RSI side needed when price falls back inside a band
longExitRsi = 5           // long exit needs RSI below this
shortExitRsi = 95         // short exit needs RSI above this

// --- Indicators ---
// Bands built on log price with exponentially weighted mean and variance.
logPrice = LOG(CustomClose)
smoothing = 2 / (bandPeriod + 1)

IF BarIndex < bandPeriod THEN
  logMean = Average[seedPeriod](logPrice)
ELSE
  logMean = smoothing * logPrice + (1 - smoothing) * logMean
ENDIF

logError = logPrice - logMean
squaredError = SQUARE(logError)
IF BarIndex < bandPeriod + 1 THEN
  logVariance = squaredError
ELSE
  logVariance = smoothing * squaredError + (1 - smoothing) * logVariance
ENDIF
logStdDev = SQRT(logVariance)

upperBand = EXP(logMean + (bandWidth * logStdDev))
lowerBand = EXP(logMean - (bandWidth * logStdDev))

trendMA = Average[trendPeriod](close)
rsiValue = RSI[rsiPeriod](close)
atrValue = AverageTrueRange[atrPeriod](close)

25 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • There is no stop loss or target, so a trade can stay open through a large adverse move.
  • The headline Nikkei 225 10 minute run had a 16,037 USD drawdown against 27,727.80 USD of profit.
  • EUR/USD 4 hours made 80,338 USD but fell 62,580 USD from peak along the way.
  • Profit factor was not recorded because only sweep data exists, and the test used a 10 point spread.

Indicators used

Bollinger BandsSMARSIATR

How to load it

  1. Copy the code with the copy button above 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.

Questions

About this strategy

Can it trade in ProOrder?

Yes. The bands are calculated in the code, so no custom indicator is needed. There is no stop, so add your own protection.

Which markets were tested?

Nikkei 225 10 minutes made 27,727.80 USD over 3898 trades. EUR/USD, Dow Jones, Silver, Nasdaq 100, Gold and S&P 500 were also positive in the runs shown.

How much drawdown at 1 contract?

At 1 contract with a 10 point spread, Nikkei 225 10 minutes had a max drawdown of 16,037 USD.

Why 10 minute bars?

RSI(2) and ATR(2) react within a few bars, so short charts give many signals. It was also tested on 30 minutes up to Daily.

Related

Strategies like this one

Bollinger Squeeze

Uses the same indicator.

14.30 PF · 86 trades

Monday Dip Buy

Best run on the same market, Nikkei 225.

n/a PF · 146 trades

Volatility Breakout

Also a volatility strategy.

1.39 PF · 475 trades

Join the ProRealAlgos waitlist and compare band systems with other traders.

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