Join today
Strategies / Trend / Bollinger Trend Catcher

Bollinger Trend Catcher: one pullback entry per trend

When the whole lower exponential band is above the 200 SMA, the trend is up, and the strategy buys the first close at or below the 20 SMA. It takes only one long per uptrend, and shorts mirror the logic. An equity curve filter pauses entries when the strategy is below its own 250 bar average.

TrendLong & shortIntradayGold10 min
n/aProfit factor
432Net profit EUR
46.55%Win rate
696Trades
-387Max drawdown
0.62Avg trade

Best run of 6. Gold, 10 min, spread 0.6, from run sweeps:2026-09-23-GOLD-10m-opt.tsv:4.

Entry rules, long

  1. Members only
  2. Price closes at or below the 20-period SMA
  3. No long has been taken yet in this uptrend
  4. Strategy equity is at or above its 250-bar average (skipped during the first 250 bars)
  5. No position is open

Entry rules, short

  1. Members only
  2. Price closes at or above the 20-period SMA
  3. No short has been taken yet in this downtrend
  4. Strategy equity is at or above its 250-bar average (skipped during the first 250 bars)
  5. No position is open

Exit rules

  1. Stop loss of 40 in account currency
  2. Profit target of 130 in account currency
  3. Members only
  4. Shorts mirror this

Test conditions

PeriodUp to 2026-09-23
InstrumentGold, 10 minutes
Spread0.6 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-23

Parameters

positionSize
Contracts per trade
1
startCapital
Starting equity used by the equity curve filter
10000
equityCurvePeriod
SMA length of the equity curve
250
fastPeriod
Entry and final exit SMA length
20
midPeriod
SMA length that arms the exit
50
trendPeriod
Trend SMA length
200
bandPeriod
Length of the exponential log-price bands
42
bandWidth
Band width in standard deviations
2.4
seedPeriod
SMA length that seeds the bands on early bars
3
stopLossMoney
Protective stop in account currency
40
takeProfitMoney
Profit target in account currency
130

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest run10 minn/a 69646.55432 EUR-387
EUR/USDDailyn/a 5242.311,660 USD-240
FTSE 1004 hoursn/a 9641.67762 EUR-362
S&P 500Dailyn/a 5446.30593 EUR-223
Nasdaq 1004 hoursn/a 11843.22462 EUR-424
FTSE 100Dailyn/a 3732.43434 EUR-344

Charts

Results by run

Net profit against max drawdown

Net profitMax drawdown
0-500-2501K2KEUR/USD · DailyFTSE 100 · 4 hoursS&P 500 · DailyNasdaq 100 · 4 hoursFTSE 100 · DailyGold · 10 min

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.

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

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

// --- Parameters ---
positionSize = 1          // contracts per trade
startCapital = 10000      // starting equity for the equity curve filter
equityCurvePeriod = 250   // SMA length of the equity curve
fastPeriod = 20           // entry and final exit average
midPeriod = 50            // average that arms the exit
trendPeriod = 200         // trend average the bands are compared with
bandPeriod = 42           // length of the log-price exponential bands
bandWidth = 2.4           // band width in standard deviations
seedPeriod = 3            // SMA used to seed the bands on early bars
stopLossMoney = 40        // protective stop in account currency
takeProfitMoney = 130     // profit target in account currency

// State: one trade per trend, and a staged exit.
ONCE longTrendUsed = 0
ONCE shortTrendUsed = 0
ONCE longExitStage = 0
ONCE shortExitStage = 0
ONCE logEma = 0
ONCE logVariance = 0

// --- Indicators ---
// Only trade while equity is at or above its own moving average.
equity = startCapital + StrategyProfit
equityCurve = Average[equityCurvePeriod, 0](equity)
equityOk = BarIndex < equityCurvePeriod OR (BarIndex > equityCurvePeriod AND equity >= equityCurve)

fastMA = Average[fastPeriod](close)
midMA = Average[midPeriod](close)
trendMA = Average[trendPeriod](close)

// Exponential bands on log price.
logPrice = LOG(CustomClose)
emaAlpha = 2 / (bandPeriod + 1)
IF BarIndex < bandPeriod THEN
  logEma = Average[seedPeriod](logPrice)
ELSE
  logEma = emaAlpha * logPrice + (1 - emaAlpha) * logEma
ENDIF
logError = logPrice - logEma
errorSquared = SQUARE(logError)
IF BarIndex < bandPeriod + 1 THEN
  logVariance = errorSquared
ELSE
  logVariance = emaAlpha * errorSquared + (1 - emaAlpha) * logVariance
ENDIF
logStdDev = SQRT(logVariance)
upperBand = EXP(logEma + (bandWidth * logStdDev))
lowerBand = EXP(logEma - (bandWidth * logStdDev))

44 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • Only sweep data exists, so profit factor was not recorded.
  • On the best run (Gold 10 minutes) the net profit of EUR 431.9 came from 696 trades, an average of EUR 0.62 per trade, which leaves very little room for extra costs.
  • Max drawdown on that run was EUR 387.3, close to the whole net profit.
  • The stop (40) and target (130) are money amounts, so they change meaning with contract size and instrument.

Indicators used

Bollinger BandsSMA

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 run in ProOrder?

Yes, it is written as a ProOrder system. The code was rewritten and not yet compile checked, so run a backtest before going live.

Where was it tested and how did it do?

Gold, EUR/USD, FTSE 100, S&P 500 and Nasdaq 100. Every listed run made a small profit, the largest being USD 1,660 on EUR/USD Daily from 52 trades.

What risk comes with 1 contract?

At 1 contract the best run had a max drawdown of EUR 387.3. Each trade risks the 40 money stop, before spread.

Why do daily runs have so few trades?

The one trade per trend rule means a new long only comes after the band has dipped below the 200 SMA and recovered. On daily bars that happens rarely, for example 37 trades on FTSE 100 Daily.

Related

Strategies like this one

Bollinger Squeeze

Uses the same indicator.

14.30 PF · 86 trades

Triple Band Market Model

Best run on the same market, Gold.

2.27 PF · 203 trades

Long-Term Moving Average Cross

Also a trend strategy.

12.31 PF · 61 trades

Curious which trend filters hold up best? Join the ProRealAlgos waitlist and compare notes.

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