Join today
Strategies / Mean reversion / Bollinger Trailing Stop Fade

Bollinger Trailing Stop Fade

A trailing stop is built from a 28-period average with bands 2 standard deviations wide. When price closes through that stop, the system bets against the break instead of following it. Trades aim for a small 9-unit target with a much wider 70-unit stop, and an opposite signal flips the position.

Mean reversionLong & shortIntradayEUR/USD30 min
n/aProfit factor
49,894Net profit USD
63.32%Win rate
4,817Trades
-34,199Max drawdown
10.36Avg trade

Best run of 2. EUR/USD, 30 min, spread 1, from run sweeps:2026-09-25-EURUSD-30m-opt.tsv:2.

Entry rules, long

  1. Members only

Entry rules, short

  1. Members only

Exit rules

  1. Members only
  2. Stop loss 70 price units from entry
  3. An opposite signal reverses the position

Test conditions

PeriodUp to 2026-09-25
InstrumentEUR/USD, 30 minutes
Spread1 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-25

Parameters

positionSize
Contracts per trade
1
bandPeriod
Band average and deviation length
28
bandWidth
Band width in standard deviations
2
takeProfitDistance
Target distance in price units
9
stopLossDistance
Stop distance in price units
70

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
EUR/USDBest run30 minn/a 4,81763.3249,894 USD-34,199
GBP/USD4 hoursn/a 1,01263.647,405 USD-7,144

Charts

Results by run

Net profit against max drawdown

Net profitMax drawdown
0-50K-25K25K50KEUR/USD · 30 minGBP/USD · 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.

// ============================================================
// Bollinger Trailing Stop Fade
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Mean reversion
// Direction: Long & short
// Timeframe tested: 30 minutes
// ============================================================

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

// --- Parameters ---
positionSize = 1            // contracts per trade
bandPeriod = 28             // band average and deviation length
bandWidth = 2               // band width in standard deviations
takeProfitDistance = 9      // target distance in price units
stopLossDistance = 70       // stop distance in price units

// --- Indicators ---
upperBand = Average[bandPeriod](close) + STD[bandPeriod](close) * bandWidth
lowerBand = Average[bandPeriod](close) - STD[bandPeriod](close) * bandWidth

// Band trailing stop: starts on the first band break, then only tightens
ONCE trailLevel = 0
ONCE trendState = 0

IF trailLevel = 0 THEN
  IF close CROSSES OVER upperBand THEN
    trailLevel = lowerBand
    trendState = 1
  ELSIF close CROSSES UNDER lowerBand THEN
    trailLevel = upperBand
    trendState = -1
  ENDIF
ENDIF

IF trendState = 1 THEN
  trailLevel = max(trailLevel, lowerBand)
ELSIF trendState = -1 THEN
  trailLevel = min(trailLevel, upperBand)
ENDIF

30 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • The stop is almost eight times the target. A 63.32% win rate in the best run still left a max drawdown of USD 34,199 against USD 49,894 net profit.
  • Profit factor was not recorded. Both results come from sweep data only.
  • Only two markets were tested: EUR/USD 30 minutes and GBP/USD 4 hours. On GBP/USD the drawdown (USD 7,143.70) almost matched the profit (USD 7,404.80).
  • The tested code has no trading time window, while the original idea was built for short intraday bars inside a session.

Indicators used

Bollinger Bands

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

Yes, it places market orders with a fixed target and stop, which ProOrder handles. The rewritten code has not been compile-checked, and the numbers come from the earlier version.

How did it perform on EUR/USD and GBP/USD?

EUR/USD 30 minutes made USD 49,894 over 4,817 trades. GBP/USD 4 hours made USD 7,404.80 over 1,012 trades, with a drawdown nearly as large.

What risk does one contract carry?

At 1 contract the EUR/USD run had a max drawdown of USD 34,199. With a 70-unit stop and a 9-unit target, a few losses can wipe out many wins, so plan for that drawdown.

Related

Strategies like this one

Bollinger Squeeze

Uses the same indicator.

14.30 PF · 86 trades

Slow MACD Slope

Best run on the same market, EUR/USD.

6.80 PF · 7,305 trades

Monday Dip Buy

Also a mean reversion strategy.

n/a PF · 146 trades

Fading breakouts is one idea among many. Join the ProRealAlgos community to see how we build full portfolios.

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