Skip to main content
Mean Reversion & Exhaustionv1.2.1

AIMS Bubble Advanced

Measures how far price has stretched from its trend and what that stretch means: a Keltner stretch channel with a regime-coloured midline, extension degrees, BandRide / BlowOff classification and two setup engines.

Stretch channel, snap-back and climax markers with the market-state dashboard — TradingView
AIMS Bubble Advanced on a US30 M15 TradingView chart with stretch channel, setup markers and market-state dashboard
Type
Indicator
Category
Mean Reversion & Exhaustion
Platforms
TradingView, MT5, MT4
Language
Pine v6, MQL5, MQL4
Repaints
No — closed bar
Keltner Stretch ChannelMarket Regime MidlineBandRide vs BlowOffSnap-Back ContinuationsClimax Reversals

What Bubble Advanced does

A Keltner channel built on a 20 EMA and ATR defines a normal range. Bubble Advanced then grades every extension beyond the outer band, classifies it as a continuation or an exhaustion peak, colours the midline by market regime and marks two kinds of setup.

Stretch Channel & Regime

EMA midline with a centre band (1.0 ATR) and a containment band (2.25 ATR). The midline is silver for Normal, green for Trending, gold for a Low-Vol Range and orange-red for Overextended.

Extension Degree & Classification

D1 for a single close beyond the band, D2 for consecutive closes, D3 for a velocity spike or bars entirely outside it. D2+ is classed BandRide or BlowOff.

Two Setup Engines

Snap-back continuations after a pullback with the slope aligned, and climax reversals: a diamond on the climax bar, then a recovery marker if a reversal bar follows within 3 bars.

How to trade Bubble Advanced

  1. Read the Regime

    Use the midline colour as context. Snap-backs in a Trending regime follow the trend; climax reversals are counter-trend and suit overextended moves classed BlowOff.

  2. Treat the Diamond as a Warning

    A diamond marks a climax bar. It is not an entry: wait for the recovery marker, which is the trigger.

  3. Keep the BandRide Safeguard On

    The safeguard blocks climax reversals while price rides the band in a runaway trend, so you avoid fading strong moves.

  4. Tune Selectivity

    Raise the minimum midline slope for fewer, stronger snap-backs, or choose the Midline EMA touch for deeper pullbacks. Signals confirm on bar close.

Prompts, not trade instructions. A SETUP READY prompt tells you to review the structure on a closed candle. It is never a command to enter blindly.

Setups and chart grammar

Bubble Advanced separates trend continuation from exhaustion before it marks a setup.

SetupContextWhat the indicator seesGoal
Snap-Back ContinuationAfter an extension beyond the containment bandPullback to the centre band (or midline) with the midline slope still aligned and a confirming barTrend-direction entry; triangle marker
Climax (Tier 1)Overextended, accelerating stretch4-Pillar: close beyond 2.25 ATR plus Bollinger (20, 2), Stochastic (5, 3) and RSI (14) extremes — or Band Poke: close beyond the band onlyWarning only; diamond marker
Recovery Reversal (Tier 2)Within 3 bars of a climaxA reversal bar after the climax, not blocked by the BandRide safeguardCounter-trend trigger; recovery marker
TRENDING

Green midline: snap-backs follow the trend.

OVEREXTENDED

Orange-red midline: extension at D2 or beyond.

LOW-VOL RANGE

Gold midline: compressed volatility.

BANDRIDE

Runaway trend riding the band: climax reversals blocked.

The Normalised Stretch Invariant

Stretch is measured in ATR from the midline, so the same thresholds work across symbols and timeframes. Signals are confirmed on bar close; the midline and bands update with the live price.

E = (Close - Midline) / ATR
Centre band = Midline +/- 1.0 * ATR | Containment = Midline +/- 2.25 * ATR
D1: one close beyond | D2: consecutive closes | D3: velocity spike or bars fully outside
Centre and containment bands with snap-back arrows, climax diamonds and recovery arrows — MetaTrader 5, NAS100 M5.
Centre and containment bands with snap-back arrows, climax diamonds and recovery arrows — MetaTrader 5, NAS100 M5.

Settings

InputTypeDefaultWhat it does
Midline Period (EMA)Integer20EMA period of the channel midline.
ATR PeriodInteger20ATR period for band width and stretch.
Centre Band MultiplierFloat1.0Inner re-entry zone width, in ATR.
Containment Band MultiplierFloat2.25Outer band width, in ATR. Closes beyond it count as an extension.
Snap-Back ContinuationsBooleantrueEnable trend pullback entries.
Snap-Back TouchStringCentre BandCentre Band or Midline EMA.
Climax ReversalsBooleantrueEnable climax diamonds and recovery markers.
Climax ModelString4-Pillar Confluence4-Pillar Confluence or Band Poke.
BandRide SafeguardBooleantrueBlock climax reversals during runaway trends.
Derivative Lookback (Bars)Integer3Bars used for stretch velocity and midline slope.
Minimum Midline SlopeFloat0.02Slope, in ATR per bar, a snap-back needs in its direction.
Max Bars Awaiting PullbackInteger20Bars a snap-back may wait for its pullback before the episode is dropped.

Use it in your EA

On MetaTrader you can read the levels and setup state from an Expert Advisor with iCustom().

// MQL5 — read Bubble Advanced setups on the last closed bar
int    h = iCustom(_Symbol, _Period, "AIMSBubbleAdvancedMT5");
double snapBuy[1], snapSell[1], recBuy[1], recSell[1];
CopyBuffer(h, 5, 1, 1, snapBuy);  // SnapBack Buy
CopyBuffer(h, 6, 1, 1, snapSell); // SnapBack Sell
CopyBuffer(h, 7, 1, 1, recBuy);   // Recovery BUY
CopyBuffer(h, 8, 1, 1, recSell);  // Recovery SELL
BufferNameValue
0Bubble MidlineEMA midline price
1–4Centre / Containment bandsCentre upper, centre lower, containment upper, containment lower
5–6SnapBack Buy / SellMarker price when a snap-back prints
7–8Recovery BUY / SELLMarker price when a Tier 2 recovery prints
9–10Tier 1 climax markersOversold / overbought climax diamonds

Frequently asked questions

Bubble Advanced adds a regime-coloured midline, extension degrees (D1–D3), BandRide / BlowOff classification, the 4-Pillar climax model with a BandRide safeguard, and a market-state dashboard on top of the stretch channel.

All indicators →

Know whether a stretch will continue or snap back.

AIMS Bubble Advanced is available on TradingView, MT5 and MT4 for iTradeAIMS members.