Appearance

Personalize your experience

Mode
Accent Color
Direction
MarketplacestrategiesBollinger Mean Reversion
QuaScript

Bollinger Mean Reversion

Free

Mean reversion from the Bollinger extremes

0.0(0)
0 installs 0 0 comments
Q
159 listings

The QuaTick team's QuaScript analyses, run by the native C++ engine.

View Profile
quascriptstrategymean-reversion
Free
Backtest this strategy Open in QuaTick IDE Edit in IDE
Version
Updated
Compatible

Live engine preview

QuaScriptQuaScript

The QuaScript engine's own output on the chart the terminal uses. Change the settings or edit the code and press Run to recompute it.

Bollinger Mean Reversionengine result
Loading the engine result…
quatick-charts · QuaScript engine on synthetic 1-minute bars · drag to pan · scroll to zoom · Run executes the script on the engine (⌘/Ctrl+Enter while editing)

About

Fades closes outside the 2-sigma band when RSI agrees, but only while the Hurst exponent says the market is mean reverting. Exits at the basis or on a 3-sigma stop.


Settings

Band length: 20

Band width: 2

Max Hurst: 0.5


Measured backtests

Run by the backtest engine on public candles, 2025-11-01 to 2026-11-01, with the script's own commission and slippage, on BTCUSDT 1h (Binance) and ETHUSDT 1h (Binance). The figures per market are in the Measured backtest panel below. Past results do not predict future returns.


Backtest it yourself

Open it on the backtesting page to run it on any symbol, interval and date range, then use Monte Carlo, optimisation, walk-forward and robustness tests.

Strategy Rules

Entry Conditions

    Exit Conditions

      Measured backtest

      BTCUSDT 1h (Binance), 2025-11-01 to 2026-11-01 · backtest engine, script costs included

      Backtest this strategy

      -0.5%

      Return

      -0.15

      Sharpe

      -3.9%

      Max DD

      16.4%

      Win Rate

      61

      Trades

      MarketTradesReturnSharpeMax DDWin rateProfit factor
      BTCUSDT 1h61-0.5%-0.15-3.9%16.4%0.94
      ETHUSDT 1h61-5.6%-1.15-7.8%9.8%0.51

      Past results on historical data do not predict future returns.

      Source Code

      Edit in IDE
      quascript
      1strategy "Bollinger Mean Reversion" {
      2 overlay = true
      3 capital = 50000
      4 commission = 0.04
      5 sizing = percent_equity
      6 size = 50
      7}
      8/// Fades closes outside the 2-sigma band when RSI agrees, but only while the Hurst exponent
      9/// says the market is mean reverting. Exits at the basis or on a 3-sigma stop.
      10len = param.int(20, title = "Band length", min = 5)
      11k = param.float(2.0, title = "Band width", min = 0.5, max = 5, step = 0.1)
      12h_max = param.float(0.5, title = "Max Hurst", min = 0.3, max = 0.7, step = 0.01)
      13 
      14(mid, up, dn) = ta.bollinger(close, len, k)
      15sd = (up - mid) / k
      16r = ta.rsi(close, 14)
      17reverting = stat.hurst(close, 100) < h_max
      18if position.size == 0 and reverting {
      19 if close < dn and r < 30 {
      20 order.market("L", side.long)
      21 exit.bracket("L exit", entry = "L", stop = mid - 3 * sd, target = mid)
      22 }
      23 if close > up and r > 70 {
      24 order.market("S", side.short)
      25 exit.bracket("S exit", entry = "S", stop = mid + 3 * sd, target = mid)
      26 }
      27}
      28pu = render.line(up, "Upper", color = color.slate.500)
      29pd = render.line(dn, "Lower", color = color.slate.500)
      30render.line(mid, "Basis", color = color.amber.400)
      31render.band(pu, pd, color = color.sky.500, opacity = 0.06)
      32render.background(reverting ? na : color.translucent(color.slate.500, 92))
      33 
      Read-only preview. Open in the QuaTick IDE to edit and deploy.

      Reviews

      No reviews yet. Be the first to review this listing.

      Discussion

      Sign in to join the discussion. Your posts and replies show up on your profile.