[ A L P H A X ] Bollinger/Keltner Volatility Pressure SystemAlphaX Volatility Pressure System — Bollinger/Keltner Squeeze Detection, Linear Regression Forecast, Multi-Confluence Band Touch Signals, Volatility Regime Classification & Institutional Dashboard
AlphaX Volatility Pressure System (VPS) is a professional-grade volatility analysis and signal system built on the interaction between Bollinger Bands and Keltner Channels — the foundation of squeeze-based trading. It combines a proprietary multi-layer squeeze engine, linear regression band forecasting, a six-factor confluence scoring system, and a comprehensive real-time dashboard into a single cohesive overlay. Designed and default-tuned for XAUUSD (Gold) on the 1-minute timeframe, fully adaptable to any instrument or timeframe.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📸 Visual Overview
The indicator displays Bollinger Bands as a gradient cloud, Keltner Channel boundaries as dotted lines, squeeze status dots on the basis line, a projected forecast envelope extending into the future, confidence-scored entry signals at band touches, mean reversion exit markers, and a full diagnostic dashboard — all in a clean, non-cluttered layout with a consistent yellow-green / red / gray color theme.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔬 The Volatility Pressure Architecture — How It Works
At the core of AlphaX VPS is the principle that volatility is cyclical — periods of compression (low volatility) are followed by periods of expansion (high volatility), and vice versa. The system detects exactly where you are in this cycle and provides actionable intelligence at every stage.
The system operates through seven integrated layers:
Layer 1 — Bollinger Bands (Volatility Envelope)
A Simple Moving Average (SMA) basis line with standard deviation bands above and below
Default: 30-period SMA with 2.2x multiplier — tuned for gold's micro-noise on 1-minute charts
The bands expand during volatile moves and contract during consolidation
Price touching or piercing the outer bands represents statistical extremes — potential reversal zones
The space between upper and lower bands is rendered as a gradient cloud that shifts color based on price position relative to the basis — yellow-green when price is above basis (bullish pressure), red when below (bearish pressure)
Layer 2 — Keltner Channels (ATR Volatility Wrapper)
An Exponential Moving Average (EMA) center line with Average True Range (ATR) bands
Default: 30-period EMA with 1.8x ATR multiplier using 20-period ATR — calibrated for gold
Keltner Channels represent the "normal" volatility range based on true range, while Bollinger Bands represent statistical deviation — the relationship between them reveals compression and expansion states
Plotted as subtle dotted lines at the channel boundaries for clean visual reference without chart clutter
Layer 3 — Squeeze Engine
Squeeze ON — detected when Bollinger Bands contract inside the Keltner Channel (BB upper < KC upper AND BB lower > KC lower). This means volatility has compressed below normal levels — a spring is being loaded
Squeeze Release — the first bar where BB breaks back outside KC after a squeeze period. This is the explosive moment where the compressed energy releases into a directional move
Squeeze status is displayed as colored dots on the BB basis line: red dots during active squeeze, yellow-green dots on squeeze release, gray dots during normal conditions
Squeeze Momentum — a John Carter-style linear regression calculation determines the direction of the squeeze release: bullish momentum (price likely to break upward) or bearish momentum (price likely to break downward)
Squeeze release events generate flash markers on the chart: "⚡ SQ↑" for bullish releases, "⚡ SQ↓" for bearish releases
The dashboard tracks how many of the last 20 bars were in squeeze state — prolonged squeezes (12+ bars) tend to produce the most explosive releases
Layer 4 — Linear Regression Forecast
A forward-looking projection of the Bollinger Band envelope using linear regression slopes
The system calculates the current slope of both the BB basis and the BB deviation, then projects them forward by the configured number of bars (default: 20 bars = 20 minutes on 1-minute chart)
The projection is smoothed using a weighted blend from current values to forecasted values, preventing jarring visual jumps
Displayed as a projected envelope with upper, basis, and lower forecast lines, plus a filled forecast cloud
Forecast color reflects projected direction: yellow-green if the basis is projected to rise, red if projected to fall
Price labels at the forecast endpoints show the projected upper and lower band values — giving you concrete target levels
A minimum bandwidth floor prevents the forecast from collapsing to zero during extreme compression
Layer 5 — Trend EMA
A 100-period Exponential Moving Average provides macro trend context
Color-coded: yellow-green when price is above (bullish structure), red when below (bearish structure)
The EMA slope direction (rising vs. falling over 3 bars) is factored into the confluence scoring system
Acts as a structural filter — signals aligned with the EMA trend receive bonus confidence, signals against it receive penalties
Layer 6 — RSI Filter
A 14-period Relative Strength Index provides momentum confirmation
Oversold threshold at 30, overbought at 70 — stricter than typical settings to filter gold noise
RSI must be in a supportive zone for signals to fire: below 45 for bullish signals, above 55 for bearish signals
Deeply oversold or overbought RSI readings contribute up to 15 points to the confluence score
Layer 7 — Volatility Regime Classification
The system continuously classifies the current market state into one of five regimes:
SQUEEZE 🔴 — BB inside KC, volatility compressed, spring loading
RELEASE ⚡ — first bar after squeeze ends, explosive move initiating
EXPANSION 📈 — bandwidth increasing and price trending directionally
COMPRESSION — bandwidth decreasing, volatility contracting
RANGING — no clear volatility trend, sideways movement
The current regime is displayed prominently in the dashboard and influences signal generation — signals during active squeeze are blocked entirely
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Signal System — Band Touch Signals
AlphaX VPS generates two types of chart signals: Entry Signals at band extremes and Exit Markers at mean reversion.
Entry Signals ( ⬆ / ⬇ )
Entry signals appear when price touches or pierces a Bollinger Band while multiple confluence factors align to confirm a high-probability reversal setup.
Bullish Entry (⬆) — a yellow-green label below the bar indicating a potential long opportunity:
Price touches or pierces the lower Bollinger Band
Confluence score meets the minimum confidence threshold (default: 60%)
RSI is below 45 (supportive of oversold bounce)
Volume is above average (institutional participation confirmed)
A swing low structure is present near the band (not just a random wick)
Candle shows bullish rejection — either a bullish close or a long lower wick (>50% of candle range)
Market is NOT in active squeeze (signals blocked during compression)
Cooldown period has elapsed since last bullish signal (default: 15 bars)
Bearish Entry (⬇) — a red label above the bar indicating a potential short opportunity:
Price touches or pierces the upper Bollinger Band
Confluence score meets the minimum confidence threshold
RSI is above 55 (supportive of overbought reversal)
Volume is above average
A swing high structure is present near the band
Candle shows bearish rejection — either a bearish close or a long upper wick
Market is NOT in active squeeze
Cooldown period has elapsed since last bearish signal
Each signal label displays the tier rating and confidence percentage :
S-Tier (80%+) — exceptional setup, maximum confluence — highest probability
A-Tier (70–79%) — strong setup, most factors aligned
B-Tier (60–69%) — decent setup, adequate confluence for a trade with proper risk management
Signals below B-Tier are automatically filtered out and never displayed.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Exit Markers ( ✕ )
After an entry signal fires, the system tracks position direction and monitors for mean reversion to the BB basis line :
Long Exit ✕ — appears when price crosses back above the BB basis after a bullish entry, indicating the mean reversion target has been reached
Short Exit ✕ — appears when price crosses back below the BB basis after a bearish entry, indicating the mean reversion target has been reached
Exit markers serve as profit-taking signals — the statistical edge of a band touch trade is the reversion to the mean (basis line). Once price reaches the basis:
Take partial or full profit
Tighten stop loss to breakeven
Wait for the next band touch signal before re-entering
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 Multi-Confluence Confidence Scoring System
Every entry signal is evaluated by a real-time scoring engine that produces a confidence percentage from 0% to 100%. This is not a simple threshold check — it is a weighted multi-factor assessment that rewards alignment and penalizes contradiction.
Scoring Factors — Bullish Signals:
Band Touch Quality (up to 20 points)
How deeply price pierced the lower Bollinger Band
Pierce depth >5% of band width = 20 points (strong penetration)
Any pierce = 15 points
Near-touch (within 0.1%) = 10 points
%B Position (up to 10 points)
Bollinger %B measures where price sits within the band range (0 = lower band, 1 = upper band)
%B below 0 (outside lower band) = 10 points
%B below 0.05 = 8 points
%B below 0.15 = 5 points
RSI Depth (up to 15 points)
RSI below 20 = 15 points (deeply oversold)
RSI below 25 = 12 points
RSI below 30 = 10 points
RSI below 40 = 3 points
EMA Trend Alignment (up to 10 points)
Price above 100 EMA AND EMA slope rising = 10 points (full alignment)
Price above 100 EMA only = 5 points
Squeeze Release Confluence (up to 10 points)
Squeeze just released with bullish momentum = 10 points (explosive setup)
Bullish squeeze momentum without active squeeze = 5 points
Candle Rejection Pattern (up to 10 points)
Long lower wick (>50% of range) + bullish close = 10 points (textbook rejection)
Long lower wick only = 7 points
Bullish close only = 3 points
Volume Confirmation (up to 10 points)
Above-average volume + bullish close = 10 points (institutional buying)
Above-average volume only = 5 points
MACD Momentum (up to 8 points)
MACD line above signal line OR histogram rising for 2+ bars = 8 points
200 SMA Structure (up to 7 points)
Price above 200 SMA = 7 points (macro trend support)
Penalty Deductions:
Price BELOW EMA trend = -15 points (counter-trend signal)
RSI above 55 = -12 points (momentum doesn't support reversal)
Active squeeze = -8 points (wait for release)
Expanding but directionless = -5 points
No volume spike when volume filter enabled = -5 points
Bearish candle rejection present = -10 points (wrong candle structure)
The same structure applies to bearish signals with inverted logic — upper band touch, overbought RSI, price below EMA, bearish rejection candles, etc.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛡 Signal Quality Gates — Why This Indicator Produces Clean Signals
Beyond the confidence score, every signal must pass through six independent quality gates before it can appear on the chart. If any single gate fails, the signal is blocked entirely — regardless of the confidence score:
Gate 1 — Band Touch Gate
Price must actually reach or pierce the Bollinger Band (within 0.1%)
Signals near the middle of the bands are impossible — only statistical extremes qualify
Gate 2 — RSI Zone Gate
Bullish signals require RSI below 45
Bearish signals require RSI above 55
This prevents signals when momentum is neutral or contradictory
Gate 3 — Volume Gate
Volume must exceed the 20-period volume moving average multiplied by 1.2x
Low-volume band touches are often noise — this gate requires institutional participation
Can be toggled off for instruments with unreliable volume data
Gate 4 — Swing Structure Gate
A swing low must be present within the last 3 bars for bullish signals (price formed a local bottom)
A swing high must be present within the last 3 bars for bearish signals (price formed a local top)
This prevents signals on through-band breakdowns where price is accelerating through the band, not bouncing off it
Can be toggled off for faster signal generation
Gate 5 — Candle Confirmation Gate
Bullish signals require either a bullish candle close (close > open) or a bullish rejection wick (lower wick > 50% of total range)
Bearish signals require either a bearish candle close or a bearish rejection wick
This confirms that price is actually rejecting the band level, not just touching it on the way through
Gate 6 — Squeeze Block Gate
No signals fire during active squeeze (BB inside KC)
During squeeze, volatility is compressed and band touches are unreliable — the bands themselves are artificially narrow
Signals resume after squeeze releases
Gate 7 — Cooldown Gate
A minimum of 15 bars (15 minutes on 1-minute chart) must elapse between signals of the same direction
Prevents signal spam during choppy band-walking conditions
This seven-gate architecture is why AlphaX VPS produces significantly fewer but higher-quality signals compared to basic Bollinger Band indicators.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Identifying Choppy / Ranging Markets — When NOT to Trade
Knowing when to stay out is just as important as knowing when to enter. AlphaX VPS provides multiple visual cues for choppy, range-bound conditions:
How to identify choppy conditions:
BB Cloud is extremely narrow — when the Bollinger Bands contract tightly, the cloud between upper and lower bands becomes paper-thin. Narrow bands = low volatility = no clean directional moves.
Squeeze dots are RED for extended periods — prolonged red dots on the basis line mean BB is trapped inside KC. While this predicts an eventual explosive move, trading during the squeeze is a losing strategy. Wait for the yellow-green release dot.
Forecast cloud is flat and narrow — if the projected envelope shows no significant expansion or directional slope, the system expects continued compression. No expansion forecast = no trade.
Regime dashboard shows "COMPRESSION" or "RANGING" — the volatility regime classifier explicitly tells you the current state. These regimes have the lowest signal quality.
No signals appearing despite price touching bands — this means the quality gates are doing their job. If you see band touches but no labels, the confluence score is too low or a gate is blocking. Trust the filter.
EMA (100) is flat and price is oscillating around it — no trend, no edge.
Basis distance in dashboard shows very small percentage — price is hugging the basis line, meaning there is no stretched rubber band to snap back. Mean reversion trades need extension first.
What to do during choppy markets:
Do not force trades — wait for squeeze release (yellow-green dot + ⚡ marker)
Watch for the forecast cloud to start expanding and tilting directionally
Monitor the regime dashboard — wait for "RELEASE ⚡" or "EXPANSION 📈" to appear
Consider moving to a higher timeframe where structure may be clearer
Use the squeeze bar counter in the dashboard — once squeeze bars reach 12+/20, the release is likely imminent
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Trade with AlphaX VPS — Step by Step
Step 1 — Assess Market Regime
Check the dashboard REGIME field: Is it EXPANSION, COMPRESSION, SQUEEZE, or RANGING?
Check the Bollinger Band cloud width: Is it expanded or collapsed?
Check squeeze dots: Red = stay out. Gray = normal. Yellow-green = just released.
If the regime is SQUEEZE or COMPRESSION → do not trade. Wait for RELEASE or EXPANSION.
Step 2 — Monitor the Forecast
Look at the projected envelope ahead of current price
Is the forecast expanding or narrowing? What direction is the basis slope?
A widening forecast with a clear directional slope tells you where the bands are heading
The forecast upper and lower price labels give you concrete projected targets
Step 3 — Wait for a Band Touch Signal
Do not chase price in the middle of the bands — wait for price to reach an extreme
A ⬆ or ⬇ label will appear only when all seven quality gates pass and the confidence score meets your threshold
The label shows the tier (S/A/B) and exact confidence percentage — use this to size your position (higher confidence = larger size)
Step 4 — Enter the Trade
Enter on the signal bar's close (signals are confirmed on bar close, non-repainting)
Place your stop loss beyond the Bollinger Band that was touched (for bullish: below the lower band, for bearish: above the upper band)
Your profit target is the BB basis line (mean reversion target) — the system will mark this with a ✕ when reached
Step 5 — Manage and Exit
Watch for the ✕ exit marker — this appears when price crosses back to the BB basis
Take partial or full profit at the basis line
If price continues past the basis toward the opposite band, you can trail your stop using the basis line as your new stop level
If a new signal appears in the same direction before the exit triggers, it can be used to add to the position
Step 6 — Squeeze Release Trades (Advanced)
When you see the "⚡ SQ↑" or "⚡ SQ↓" release marker, this is a momentum breakout setup
The squeeze release direction (bull/bear) is determined by the squeeze momentum calculation
Enter in the direction of the release
These moves tend to be explosive — use wider stops and larger targets than mean reversion trades
The forecast projection will often show an expanding envelope in the direction of the release — use the forecast band endpoints as extended targets
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 Real-Time Dashboard — Complete Market Intelligence
The dashboard provides a comprehensive snapshot of every metric the system monitors, organized into five sections:
─── VOLATILITY ───
REGIME — Current volatility state (Squeeze / Release / Expansion / Compression / Ranging) with color-coded background
BANDWIDTH — Current BB width as percentage of basis, colored relative to its 50-period average (narrow = green/opportunity, wide = red/extended)
BB %B — Where price sits within the bands (0% = lower band, 100% = upper band). Extreme readings are color-highlighted
SQUEEZE BARS — How many of the last 20 bars were in squeeze (higher = more compressed = bigger expected release)
KC RELATION — Whether BB is inside KC (squeeze), above KC (expansion), or near KC (transition)
─── MOMENTUM ───
RSI — Current RSI value with zone label (OB/OS/HIGH/LOW/MID) and appropriate coloring
EMA — Trend direction based on price vs. 100 EMA and EMA slope (▲ BULL / ▲ RISING / ▼ BEAR / ▼ FALLING)
SQ MOMENTUM — Squeeze momentum direction and strength (▲▲ STRONG UP / ▲ RISING / ▼▼ STRONG DOWN / ▼ FALLING / — FLAT)
MACD — MACD momentum status (▲ BULLISH / ▼ BEARISH / — NEUTRAL)
VOLUME — Whether current volume exceeds the moving average threshold (▲ ABOVE AVG / — NORMAL)
─── CONFIDENCE ───
BULL CONF — Current bullish confluence score with tier rating (S-TIER / A-TIER / B-TIER / C-TIER / LOW)
BEAR CONF — Current bearish confluence score with tier rating
These update in real-time so you can see confluence building before a signal fires
─── FORECAST ───
BASIS SLOPE — Direction the BB basis is heading (▲ RISING / ▼ FALLING / — FLAT)
BAND FORECAST — Whether bands are projected to widen (▲ WIDENING) or narrow (▼ NARROWING) or remain stable
─── STRUCTURE ───
SMA 200 — Price position relative to 200 SMA (▲ ABOVE / ▼ BELOW) — macro trend context
─── TRADE STATE ───
POSITION — Current tracked position direction (▲ LONG / ▼ SHORT / — FLAT) with color-coded background
BASIS DISTANCE — How far price is from the BB basis as a percentage — measures extension and mean reversion potential
Dashboard position (Top Left / Top Right / Bottom Left / Bottom Right) and text size (Tiny / Small / Normal) are configurable.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
📊 Bollinger Bands with gradient trend cloud — instant visual of price position within the volatility envelope
🔷 Keltner Channels with ATR-based boundaries — the volatility reference for squeeze detection
🔴 BB/KC Squeeze Engine — detects compression, tracks squeeze duration, classifies release direction
⚡ Squeeze Release Flash Markers — "⚡ SQ↑" and "⚡ SQ↓" labels mark the explosive moment
🔭 Linear Regression Forecast — projects the band envelope forward with directional slope and price targets
🎯 Multi-confluence band touch signals — six-factor scoring with seven independent quality gates
📐 Volume filter — requires above-average volume for signal confirmation (toggleable)
🏗 Swing structure filter — requires local swing formation near bands (toggleable)
🕯 Candle rejection analysis — wick ratio and close direction confirmation
📈 MACD momentum integration — histogram trend confirmation within the scoring system
📏 200 SMA macro structure — long-term trend context for scoring
📐 100 EMA trend filter — intermediate trend direction and slope analysis
✕ Mean reversion exit markers — automatic profit target detection at the BB basis
🏷 Tiered signal labels — S / A / B tier with confidence percentage for position sizing decisions
📋 22-row real-time dashboard — complete market intelligence across volatility, momentum, confidence, forecast, structure, and trade state
🎨 Cohesive dual-tone color theme — yellow-green for bullish, red for bearish, orange for neutral, gray for inactive
🔔 11 alert conditions — S-Tier, A-Tier, and any-tier for both bull and bear, plus squeeze releases and exits
⚙ Fully configurable — all periods, multipliers, thresholds, colors, gates, and dashboard settings adjustable from the settings panel
🚫 No candle coloring — clean chart by default, your candles remain untouched
📏 Non-repainting — all signals confirmed on bar close
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Settings Reference
📊 Bollinger Bands
BB Length — SMA period for the basis line (default: 30)
BB Multiplier — standard deviation multiplier for band width (default: 2.2)
Source — price source for calculations (default: close)
Show BB Cloud — toggle the gradient band fill
🔷 Keltner Channel
KC Length — EMA period for the center line (default: 30)
KC ATR Multiplier — ATR multiplier for channel width (default: 1.8)
KC ATR Length — ATR calculation period (default: 20)
Show KC Lines — toggle Keltner boundary display
⚡ Squeeze
Show Squeeze Dots — toggle colored dots on the basis line
Alert on Squeeze Release — enable squeeze release alerts
🔭 Forecast
Show Regression Forecast — toggle the projected envelope
Forecast Bars — how many bars forward to project (default: 20)
🎯 Signals
Show Band Touch Signals — master toggle for entry labels
Min Confidence % — minimum confluence score required (default: 60%)
Signal Cooldown — minimum bars between same-direction signals (default: 15)
Show Mean Reversion Exits — toggle ✕ exit markers
📈 RSI Filter
RSI Length — calculation period (default: 14)
RSI Oversold — threshold for oversold scoring bonus (default: 30)
RSI Overbought — threshold for overbought scoring bonus (default: 70)
📐 EMA Trend Filter
Show Trend EMA — toggle the 100 EMA display
EMA Length — EMA period (default: 100)
📊 Volume Filter
Use Volume Confirmation — enable/disable volume gate (default: ON)
Volume Threshold Multiplier — how far above average volume must be (default: 1.2x)
Volume MA Length — period for volume moving average (default: 20)
🏗 Structure Filter
Use Swing Structure Filter — enable/disable swing gate (default: ON)
Swing Lookback — bars to check for swing formation (default: 3)
🎨 Colors
Bull Primary — yellow-green family for all bullish elements
Bear Primary — red family for all bearish elements
Basis / Neutral — orange for basis and neutral elements
Squeeze ON / OFF / Neutral — dot colors for squeeze states
Forecast Bull / Bear — projection envelope colors
Dashboard BG / Text / Neutral — dashboard styling
📋 Dashboard
Show Dashboard — master toggle
Position — corner placement (default: Top Right)
Text Size — Tiny / Small / Normal (default: Small)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Conditions
S-Tier Bull Band Touch — fires when a bullish signal with 80%+ confidence appears
A-Tier Bull Band Touch — fires when a bullish signal with 70–79% confidence appears
Any Bull Band Touch — fires on any bullish signal meeting minimum threshold
S-Tier Bear Band Touch — fires when a bearish signal with 80%+ confidence appears
A-Tier Bear Band Touch — fires when a bearish signal with 70–79% confidence appears
Any Bear Band Touch — fires on any bearish signal meeting minimum threshold
Any Band Touch Signal — fires on any entry signal regardless of direction
Squeeze Release — Bullish — fires on bullish squeeze release
Squeeze Release — Bearish — fires on bearish squeeze release
Any Squeeze Release — fires on any squeeze release
Long Exit — Mean Reversion — fires when a long position reaches the BB basis
Short Exit — Mean Reversion — fires when a short position reaches the BB basis
All alert messages include {{ticker}}, {{interval}}, and {{close}} placeholders for webhook integration.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Default Settings — Optimized For
The default configuration is specifically tuned for XAUUSD (Gold) on the 1-minute timeframe :
BB Length 30 and Multiplier 2.2 — smooths gold's micro-noise and widens bands to reduce false touches
KC Length 30 and ATR Multiplier 1.8 — matched to BB for proper squeeze detection on gold
Confidence threshold at 30% — aggressively filters low-quality signals while keeping genuine setups
Cooldown at 4 bars (4 minutes) — prevents signal spam during volatile gold transitions
Volume filter enabled with 1.2x threshold — confirms institutional participation
Swing structure filter enabled — requires actual price structure, not random wicks
100 EMA provides ~1.5 hours of trend context on 1-minute
20-bar forecast projects 20 minutes ahead — practical for scalping decisions
For other instruments or timeframes, adjust:
Higher timeframes (5m, 15m, 1H) — reduce BB Length to 20–25, reduce confidence to 45–55%, increase forecast bars to 30–50
Forex majors (EURUSD, GBPUSD) — reduce BB Multiplier to 2.0, reduce KC ATR Multiplier to 1.5, keep confidence at 50–60%
Indices (NAS100, US30, SPX500) — use defaults or increase BB Length to 35–40 for broader structure
Crypto (BTCUSD, ETHUSD) — increase BB Multiplier to 2.5, increase cooldown to 20–25 bars due to higher volatility
Less noise / fewer signals — increase Min Confidence to 70%+, increase Cooldown, enable all gates
More signals / aggressive scalping — decrease Min Confidence to 40–50%, reduce Cooldown to 8–10, disable Swing Structure gate
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
🥇 Gold (XAUUSD) scalpers and intraday traders — built and default-tuned specifically for gold's volatility, noise profile, and session structure
📊 Bollinger Band traders — if you trade band touches and mean reversion, this system adds institutional-grade filtering to your existing strategy
⚡ Squeeze traders — the BB/KC squeeze engine with momentum direction and release markers provides a complete squeeze trading system
📉 Forex and index traders — applicable to all major instruments with minor setting adjustments
🧠 Systematic traders — the confidence scoring system provides a quantitative framework for position sizing and trade selection
📈 Traders who value clean charts — no indicator clutter, no candle painting, no overlapping signals. One cohesive system with consistent color coding
⚠ Traders who struggle with overtrading — the seven quality gates physically prevent low-quality signals from appearing. You cannot overtrade what you cannot see
🔭 Forward-looking traders — the regression forecast gives you a projected roadmap that most indicators do not provide
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
All calculations are non-repainting — signals are confirmed on bar close only
The linear regression forecast updates on each new bar — the projection is a mathematical estimate, not a guarantee of future price action
Volume filter uses the volume data provided by your broker/data feed — for instruments or exchanges with unreliable volume, consider disabling the volume gate
The 200 SMA used in scoring requires 200 bars of history to calculate — on very short chart histories, this factor may not contribute to early signals
Maximum 500 labels per chart are supported by TradingView — on very low timeframes with extended history, oldest labels may be automatically removed
The forecast polyline uses TradingView's polyline drawing objects — a maximum of 100 polylines are allocated
Dashboard uses a table object that updates on the last bar — it reflects real-time values on live charts
Squeeze momentum calculation uses the John Carter method — linear regression of the midline-basis deviation over the BB length
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Disclaimer
This indicator is a technical analysis and visualization tool intended for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. All signals are generated from historical and real-time price data using mathematical calculations — their accuracy or profitability is not guaranteed. Past performance of any signal type does not guarantee future results. Always conduct your own analysis, use proper risk management, and consult a licensed financial advisor before making any trading decisions. The author accepts no responsibility for any losses incurred from the use of this indicator.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Built for traders who demand clarity, precision, and institutional-grade filtering from their volatility analysis. Gösterge

Bollinger Cluster Absorption targets [KNN Engine]Bollinger Cluster Absorption - On-Chart Visualizer & HUD
This indicator is an advanced, machine-learning-assisted structural mapping tool. It moves beyond traditional momentum oscillators by evaluating standard deviation and mean reversion relative to a dynamically anchored cluster of Bollinger bands, utilizing a 6-Dimensional K-Nearest Neighbors (KNN) classification algorithm.
Operating purely as an on-chart interface and risk management suite, it overlays structural geometries, Maximum Favorable Excursion (MFE) tracking boxes, and simulated Kelly Criterion position sizing directly onto your price chart.
The Core Engine: Dynamic Bollinger Basis Clusters
Unlike standard Bollinger Bands that measure standard deviation over fixed periods (e.g., 20 periods), this engine measures the tension of price relative to an entirely dynamic array of Liquidity Anchors.
Anomaly Detection (The Anchor): The script continuously tracks volume using a rolling Z-score. When a significant institutional liquidity event occurs (volume spikes above your defined Z-score threshold), the script drops an "Anchor."
Dynamic 24x Array: Upon an anchor trigger, the script initializes a new Simple Moving Average (the "Basis" line of a Bollinger Band) from that exact bar. It tracks up to 24 of these anchored basis lines simultaneously, recalculating their averages bar-by-bar.
Z-Score Standardization (Meta-Mean): To distill 24 different basis lines into a single readable metric, the script calculates their cross-sectional average (the "Meta-Mean" of the cluster). It then calculates the Z-Score of the current Price relative to this cluster's mean and standard deviation. This provides a standardized measure of whether price is extremely overbought or oversold compared to the aggregate institutional baseline.
The Machine Learning Module (KNN)
The engine evaluates market conditions by feeding a 6-Dimensional sensory matrix into a K-Nearest Neighbors (KNN) classification algorithm. The six features evaluated are:
Bollinger Deviation (Z-Score): The current standardized distance of price from the dynamic cluster center.
Deviation Velocity: The bar-to-bar momentum of price moving toward or away from the cluster.
Price Velocity: Z-Scored rate of change of price from a baseline 50-SMA.
Cluster Consensus: The ratio of the 24 active basis lines positioned above versus below current price (measuring mean-reversion pressure).
Historical Rate of Change: An 8-bar lookback of the Bollinger Deviation.
Cluster Squeeze (Compression): Standard deviation of the 24 anchors themselves to identify tightly coiled structural energy (the famous "Bollinger Squeeze").
The algorithm maps this 6D state and calculates the Euclidean distance to a memory bank of the last 500 historical setups. It isolates the K most mathematically identical past environments and evaluates their success rates, returning a real-time Probability Score.
On-Chart Visuals & MFE/LFE Box Engine
Rather than cluttering your chart with disjointed arrows, this visualizer groups continuous, same-direction KNN signals into clean structural "Streaks."
Independent Line Mitigation: The AI projects forward-looking target lines (Scalp target and Stop Loss floor). These lines actively track price tick-by-tick. The exact moment price intersects a target, that specific line halts, solidifies, and stops extending, leaving a permanent structural footprint.
Profit Box (Blue): Stretches vertically from your initial entry up to the projected target. It dynamically expands to the right, snapping exactly to the bar that achieved the Maximum Favorable Excursion (MFE).
Risk Box (Red): Drops from the entry to the absolute minimum anchored stop loss, highlighting the exact Lowest Favorable Excursion (LFE) (Maximum Adverse Excursion) of the active structural streak.
Streak Termination: A structural streak only ends when the absolute minimum Stop Loss is breached or an opposing KNN signal flips the mathematical momentum.
The Agent Diagnostic Dashboard (HUD)
The built-in dashboard provides real-time diagnostic transparency into the engine's internal state:
Market Context: Live metrics for Bollinger Deviation (Z), Trend Vector, Cluster Squeeze (Z), and Cluster Consensus.
AI Probability: The live win-rate probability generated by the companion 6D KNN engine.
Live Portfolio Tracking: Simulates a compounding equity curve. It tallies the Hit Rate of the KNN algorithm and computes a simulated dollar PnL based on your starting capital.
Dynamic Bet Sizing (Kelly Criterion): Utilizing the KNN probability and your defined Risk/Reward parameters, the dashboard simulates optimal position sizing via a dampened Kelly Criterion formula. It actively scales simulated risk up during high-probability setups and scales down when the edge decreases, capping at a strict maximum to prevent ruin.
Disclaimer: The portfolio tracker and Kelly sizing metrics are simulated diagnostic tools meant for the educational evaluation of the KNN algorithm's historical efficacy. This tool provides statistical classification of historical data, which does not constitute financial advice, predictive guarantees, or real-world trading results. Gösterge

Gösterge

Bollinger Cluster Absorption Engine [KNN Engine]Bollinger Cluster Absorption Engine
1. What the Script Does
The Bollinger Cluster Absorption Engine is a high-order structural consensus oscillator designed to identify major trend exhaustion and mean-reversion opportunities. It moves beyond standard Bollinger Bands by evaluating price action across 24 simultaneous Simple Moving Average (SMA) time-horizons.
Furthermore, it introduces a built-in K-Nearest Neighbors (KNN) Machine Learning Algorithm to calculate the statistical probability of a structural mean-reversion bounce based on historical market data.
Rather than relying on a single, arbitrary SMA length, this indicator mathematically aggregates 24 distinct cost-basis cycles to verify if the entire institutional ecosystem is overextended. It visualizes this data through a dynamically scaling histogram, a multi-ribbon fan, and rolling volatility boundaries.
2. The Core Innovation: How it Calculates Everything
Standard moving averages rely on fixed lookback periods (e.g., a 20-SMA), which inherently drop relevant historical data simply because a fixed amount of time has passed. This script is fundamentally original because it abandons fixed lookbacks in favor of Anomaly Anchoring, Expanding SMA Recursion, and Predictive Classification.
Anomaly Anchoring: The engine constantly scans volume for statistical deviations. When it detects a volume spike exceeding a 2.5 Z-Score, it drops a mathematical "Anchor." It tracks the last 24 of these institutional liquidity events simultaneously.
Expanding SMA Recursion: From each of the 24 anchor points, the script begins calculating an independent Simple Moving Average. Unlike EMAs which decay quickly, these SMAs act as a "slow-burn" anchor, retaining the true structural memory of the original volume event.
The Consensus Meta-Mean: The script calculates the absolute average of all 24 active SMA lines. This "Meta-Basis" represents the true structural equilibrium of the market. The distance of price from this average is converted into a Z-Score, standardizing the deviation across any asset class.
The K-Nearest Neighbors (KNN) Engine: When the script detects 100% Consensus (e.g., all 24 active SMAs are simultaneously above or below price), it captures the exact numerical fingerprint of the market (Basis Deviation, Deviation Velocity, and Price Velocity). The KNN engine calculates the Euclidean Distance between the current fingerprint and the last 300 historical fingerprints. It finds the 5 nearest neighbors (the 5 times history looked mathematically identical) and checks their win/loss results to generate a live probability score.
3. Justifying the Methodology
Why combine 24 expanding SMAs with a KNN machine learning model? Because true structural "Fair Value" is rarely defined by a single moving average.
While Exponential Moving Averages (EMAs) are great for tracking fast momentum, Simple Moving Averages (SMAs) are the benchmark for long-term structural stability. By anchoring 24 separate SMAs to actual volume anomalies, we verify if the entire market ecosystem—even the slowest, most structurally sound metrics—agrees on the overextension. By passing that data through a KNN algorithm, we filter out low-quality traps by asking the data: "The last 5 times the structural basis snapped this aggressively, did price successfully reverse by at least 0.1%?"
4. How to Use the Indicator
Visual Layout:
The Structural Fan (Ribbons): 24 individual SMA lines plotted on a standardized Z-axis. When tightly compressed, the structural basis is unanimous. When fanned out, the structural basis is conflicted.
The Engine Histogram: Visualizes the standardized deviation of price from the Meta-Basis using a clean, standardized color baseline: Blue for upward deviation and Red for downward deviation.
Expansion (Bright): Bright Blue or Bright Red bars indicate that price is actively accelerating away from its structural equilibrium.
Contraction (Dark): Dark, highly transparent bars indicate that the move is decaying or cooling off back toward the zero-line.
Tactical Trade Execution:
Spot the Structural Purge: Watch the histogram expand into extreme territory (Bright Blue for bullish potential, Bright Red for bearish potential). Because this is an SMA engine, this happens when price has completely disconnected from its slow-burn institutional fair value. Do not enter yet.
Wait for the Machine Learning Confirmation: Wait for the background to flash Lime (Bullish) or Red (Bearish) with a printed percentage (e.g., 80%). This means the KNN algorithm has verified that identical historical structural snaps successfully reversed price.
The Trigger: Wait for the white Signal Line to peak (often printing an Exhaustion ✧ marker) and begin receding back toward the zero-line, ultimately "re-enveloping" the histogram bars. This confirms that the extreme directional friction has officially snapped, signaling a high-probability mean reversion. Gösterge

Gösterge

Gösterge

Gösterge

BB Volatility Squeeze MomentumBB Volatility Squeeze / Expansion
This indicator highlights periods when Bollinger Bands are tight relative to price (a volatility squeeze) versus wider expansion phases. Squeeze conditions can be based on Keltner Channels, a percentile of BB width, or both.
What it shows on the chart
Bollinger Bands (upper, lower, SMA basis) drawn on price. Band and fill colors switch with squeeze state: cool tones (blue) when a squeeze is active, warm tones (orange) when it is not.
Small dots under each bar summarize how each underlying squeeze method reads that bar:
Green: neither Keltner nor percentile squeeze
Red: Keltner squeeze only
Orange: percentile squeeze only
Yellow: both methods agree (squeeze on both)
Dot vertical position is controlled as a percentage of the bar range below the low.
Squeeze logic (summary)
Keltner-based: Squeeze when the Bollinger envelope sits inside the Keltner envelope (BB lower above KC lower and BB upper below KC upper).
Percentile-based: Computes BB width as (upper - lower) / basis. Squeeze when the percent rank of that width over the lookback is below your threshold (e.g. unusually narrow vs. recent history).
Squeeze method input chooses Keltner only, percentile only, or either (fires if either condition is true). The active squeeze used for band coloring follows that choice; the dots always show both methods for comparison.
Multi-timeframe (MTF) table
A table in the top-right shows four user-selected timeframes. For each TF it reports whether Keltner and percentile squeezes are on (SQZ) or off (—), with red/green cell backgrounds. Calculations use request.security() with no lookahead.
Inputs (by group)
Bollinger Bands: length, standard-deviation multiplier.
Keltner Channels: length, ATR multiplier.
Percentile method: lookback bars for the percent rank, squeeze threshold (percentile).
Squeeze method: Keltner / percentile / both.
MTF table: four timeframe strings (defaults: 15m, 1h, 4h, daily).
Visuals: squeeze dot offset below the bar (% of range).
License
This source code is subject to the terms of the Mozilla Public License 2.0.
Gösterge

Bollinger Bands Bull/Bear B2Bollinger Bands Bull/Bear
by MasterTony
Overview & How It Works:
This indicator enhances classic Bollinger Bands by the legendary John Bollinger with emphasizing dynamic bull/bear coloring, gradient strength fills, overextension highlights, and an orange squeeze overlay to visualize volatility contraction.
Core Calculations:
Basis Line: User-selectable moving average (SMA by default) of the source (close by default).
Upper / Lower Bands: Basis ± (Multiplier × Standard Deviation over the chosen length). Default multiplier = 2.0.
Bull / Bear State Determination: Price position relative to the basis and outer or lower bollinger bands, smoothed with a short EMA.
Hysteresis is applied to prevent rapid flipping during consolidation.
Result: stable bullish state when price is convincingly above the basis, bearish when below.
Proximity & Gradient Strength: Distance from price to each band is measured and normalized against current band width.
The closer price is to a band, the stronger the signal and the more opaque the fill becomes.
Colored Band Fills: Bullish state → mint-green fills around both bands (brighter/opaquer when price hugs the upper band).
Bearish state → red fills around both bands (brighter/opaquer when price hugs the lower band).
Special Overextension Fill:
When price is very close (>85%) to the "active" band (upper in bull, lower in bear) and the state is confirmed, a Brighter gradient of the band green (bull) or lred (bear).
Strong Vs Weak Bollinger
Thicker the Bollinger Band stronger the trend, thinner the weaker. Gradient going from brighter to more transparent highlights potential exhaustion of strong Bollinger.
Squeeze Detection (Orange Overlay):
Bollinger Band Width Percentile (BBWP) is calculated over a user-defined lookback (default 100 bars).
Squeeze = BBWP ≤ 25% (bands are historically narrow).
Tight squeeze = BBWP < 15% → brighter orange.
Orange fill covers the entire area between upper and lower bands during squeeze periods.
Toggle available to hide squeeze fills if desired.
How to Read & Trade This Indicator
Visual Interpretation:
Green-dominant chart (mint fills + possible light-green basis-to-band fill) = bullish bias. The brighter and fuller the green, the stronger the momentum (price pushing against or touching the upper band).
Red-dominant chart (red fills + possible light-red basis-to-band fill) = bearish bias. Brighter/fuller red = stronger downward pressure.
Light special fills (light green or light red from basis to band) = overextension zone. Often seen near trend extremes — watch for continuation (breakout) or reversal (failure to hold the band).
Orange overlay = low volatility / squeeze. Two shades:
Lighter orange = regular squeeze (potential move brewing).
Brighter orange = very tight squeeze (high probability of imminent explosive move).
Trading Guidelines:
Trend Following (Shows Bull Zone and Bear Zones):
In green fills → favor longs or hold existing longs.
In red fills → favor shorts or hold existing shorts.
Strength increases as fills become more opaque (price near the outer band).
Squeeze Breakouts (Highest Probability Setups):
Wait for orange squeeze to appear.
When price closes outside the bands (breakout), enter in the direction of the break.
Bias the trade toward the prevailing color:Breakout upward during green fills = strong long signal.
Breakout downward during red fills = strong short signal.
If breakout direction opposes the color bias, be cautious (lower probability).
Entry/Exits:
Follow the Band color, Band color with special fill green or red is strong to determining Bull or Bear states. Green=price up Red= Price down
Risk Management:
Use the basis line as dynamic support/resistance.
Stops can be placed just beyond the opposite band or basis during strong trends.
Combine with volume or other confirmation for higher conviction.
This visual upgrade makes Bollinger Bands far more intuitive — the chart literally colors itself bullish or bearish while highlighting volatility cycles and overextension zones. Great for trend, breakout, and mean-reversion strategies across any timeframe.
Enjoy fellow traders, this is V1 more versions will be updated.
Please also boost and comment would love your ideas on advancements to this.
Cheers,
MasterTony Gösterge

Lumina Trend Channels [Pineify]Lumina Trend Channels
The Lumina Trend Channels is a dynamic, volatility-adaptive channel system that combines an Exponential Moving Average (EMA) baseline with Average True Range (ATR) band projections and slope-based trend detection to create a visually intuitive, all-in-one trend-following overlay. Unlike static channel indicators that use fixed-width bands, Lumina Trend Channels automatically expands and contracts its four-band envelope in real time as market volatility changes, keeping the channel structure relevant across all market conditions. The channel color shifts between bullish and bearish states based on the direction of the baseline slope, and buy/sell signals are generated only when price crosses the baseline in alignment with the confirmed trend — filtering out counter-trend noise and providing cleaner entry timing for trend traders.
Key Features
EMA baseline with ATR-scaled bands — a responsive center line surrounded by four symmetrical bands whose width adapts dynamically to current volatility via ATR measurement.
Slope-based trend detection — trend direction is determined by whether the EMA baseline has risen or fallen for two consecutive bars, providing a simple yet effective trend filter.
Trend-aligned buy/sell signals — BUY signals trigger only when price crosses above the baseline during a confirmed uptrend; SELL signals trigger only during a confirmed downtrend, eliminating counter-trend false entries.
Gradient-style visual channel — layered fills with progressive transparency create a glowing channel effect that fades outward from the baseline, making trend direction and volatility state immediately visible.
Trend change markers — circle markers appear on the baseline at the exact bar where the trend flips, providing clear visual anchors for regime changes.
Built-in alert conditions — configurable alerts for buy signals, sell signals, and trend changes for hands-free monitoring.
How It Works
The indicator follows a three-stage calculation process to construct the channel and generate signals:
Baseline calculation via EMA: The closing price is smoothed using an Exponential Moving Average with a configurable period (default: 21). The EMA was chosen over SMA because it assigns greater weight to recent prices, producing a center line that reacts faster to price changes while maintaining smoothness. This baseline serves as both the channel center and the reference line for signal generation.
Volatility measurement via ATR: The Average True Range is calculated over the same lookback period as the EMA. ATR measures the average bar range (accounting for gaps), providing a robust volatility metric. Four bands are then projected symmetrically around the baseline: inner bands at basis ± ATR × inner multiplier (default: 1.0) and outer bands at basis ± ATR × outer multiplier (default: 2.0). As volatility expands, the bands widen; as it contracts, they narrow — keeping the channel proportional to actual market conditions.
Trend detection via baseline slope: The trend state is determined by checking whether the EMA baseline has been rising (increasing for 2 consecutive bars) or falling (decreasing for 2 consecutive bars). If rising, the trend is set to bullish; if falling, bearish. If neither condition is met, the previous trend state is maintained. This persistence mechanism prevents rapid trend flipping during sideways consolidation.
Trading Ideas and Insights
The Lumina Trend Channels is designed to serve multiple trading approaches across different timeframes and markets:
Trend-following entries: The primary use case — when a BUY triangle appears below a bar, it means price has crossed above the EMA baseline while the channel is green (bullish). This confirms that the immediate price action and the broader trend are aligned. Enter long and consider the upper inner or outer band as a potential profit target. The SELL triangle is the mirror setup for short entries during bearish channels.
Volatility-based position sizing: The ATR-driven band width provides a built-in volatility gauge. When the channel is wide, the market is volatile — consider smaller position sizes or wider stops. When the channel is narrow, volatility is compressed — tighter stops may be appropriate, and a breakout from the narrow channel often precedes a strong directional move.
Dynamic support and resistance: The inner and outer bands act as dynamic support/resistance levels. In an uptrend, pullbacks to the lower inner band often find support; in a downtrend, rallies to the upper inner band often meet resistance. The outer bands represent extreme volatility extensions where price is statistically stretched.
Trend change detection: The circle markers on the baseline highlight the exact moment the trend flips. These are valuable for swing traders who want to exit positions when the trend turns against them, or for traders looking to enter early in a new trend direction.
How Multiple Indicators Work Together
The Lumina Trend Channels integrates three technical components into a unified system, each serving a distinct analytical role:
Exponential Moving Average (trend center): The EMA provides the structural backbone of the channel. It defines the center line around which all bands are constructed and serves as the crossover reference for signal generation. Its low-lag property ensures the channel tracks price closely, keeping the entire system responsive to current market conditions.
Average True Range (volatility scaling): ATR transforms the channel from a fixed-width envelope into a volatility-adaptive one. By scaling band distances with ATR, the channel automatically adjusts to the market's current behavior — wide during volatile periods, narrow during quiet ones. This means the bands always represent statistically meaningful distance from the baseline, regardless of the instrument or timeframe.
Slope-based trend filter (directional bias): The trend detection layer adds a directional gate to the entire system. Without it, every EMA crossover would generate a signal — including counter-trend ones during choppy markets. By requiring the baseline to be actively rising (for buys) or falling (for sells), the trend filter ensures signals only fire when the broader directional context supports the trade.
The synergy is layered: EMA establishes the trend center → ATR scales the channel to current volatility → slope detection determines the trend state → signals fire only when price action and trend direction agree. This multi-layer filtering produces a system where each component reinforces the others, resulting in higher-conviction signals than any single component could provide alone.
Unique Aspects
Volatility-adaptive channel with trend coloring: While many channel indicators use either fixed bands (like Bollinger Bands with standard deviation) or trend coloring separately, Lumina Trend Channels combines ATR-driven dynamic width with slope-based trend coloring in a single overlay. The result is a channel that communicates both volatility state and trend direction simultaneously through its shape and color.
Gradient transparency design: The four-layer fill system uses progressive transparency — inner zones are more opaque, outer zones more transparent — creating a natural visual gradient that draws the eye toward the baseline. This design choice makes it immediately obvious where the channel center is and how far price has extended from it.
Trend-gated signals: Rather than generating signals on every baseline crossover, the indicator requires trend confirmation before triggering entries. This simple but effective filter dramatically reduces false signals during sideways or transitional market phases, where most crossover-based systems struggle.
Minimal parameter design: With only three calculation inputs (length, outer multiplier, inner multiplier), the indicator avoids over-parameterization. The single length parameter controls both the EMA and ATR simultaneously, ensuring the baseline and volatility measure are always in sync.
How to Use
Add the indicator to your chart. It overlays directly on the price chart, displaying a four-band channel with a central baseline, all colored according to the current trend direction.
Observe the channel color: green indicates a bullish trend (baseline is rising), red indicates a bearish trend (baseline is falling). Trade in the direction of the channel color for higher-probability setups.
Watch for BUY triangles (green, below bars) — these appear when price crosses above the baseline during a confirmed uptrend. Consider entering long with a stop below the lower inner or outer band.
Watch for SELL triangles (red, above bars) — these appear when price crosses below the baseline during a confirmed downtrend. Consider entering short with a stop above the upper inner or outer band.
Use the circle markers on the baseline to identify trend changes. These mark the exact bar where the channel flipped color, useful for timing exits or preparing for new trend entries.
Monitor the channel width as a volatility gauge — wide channels mean high volatility, narrow channels mean low volatility and potential breakout setups.
Set up alerts using the built-in alert conditions for buy signals, sell signals, and trend changes to automate your monitoring.
Customization
Channel Length (default: 21): Controls both the EMA baseline period and the ATR lookback. Lower values (e.g., 10–14) make the channel more responsive and generate more signals, suitable for shorter timeframes or scalping. Higher values (e.g., 34–55) produce a smoother, more stable channel for swing trading or higher timeframes.
Outer Band Multiplier (default: 2.0): Scales the distance of the outer bands from the baseline. Increase for wider outer bands that capture more extreme price extensions; decrease for tighter outer bands that stay closer to price action.
Inner Band Multiplier (default: 1.0): Scales the distance of the inner bands from the baseline. Adjust to control the width of the inner channel zone. A value of 0.5 creates a narrow inner zone; a value of 1.5 widens it.
Bullish Color (default: green): The color applied to all channel elements during uptrends. Customize to match your chart theme.
Bearish Color (default: red): The color applied to all channel elements during downtrends. Customize to match your chart theme.
Conclusion
The Lumina Trend Channels delivers a clean, volatility-adaptive channel overlay that combines EMA-based trend tracking, ATR-driven dynamic band scaling, and slope-based trend detection into a single, cohesive indicator. Its gradient-style visual design provides immediate, at-a-glance understanding of trend direction, volatility state, and price position within the channel. By gating buy and sell signals with trend confirmation, the indicator filters out counter-trend noise and delivers higher-conviction entries aligned with the prevailing market direction. Whether you trade stocks, forex, crypto, or futures, the Lumina Trend Channels adapts to your instrument and timeframe, offering a refined approach to trend-following and volatility-aware trading decisions.
Gösterge

GCM RSI Ultra ScalperDescription:
Title: GCM RSI Ultra Scalper (GCM RUS)
"Engineering Edge. Executing Precision."
-uniGram
📌 Overview
The GCM RSI Ultra Scalper is an institutional-grade momentum and volatility engine engineered for precision trading. Unlike traditional static oscillators that fail during strong trends, this hybrid system dynamically adapts to market conditions by layering real-time price action over an advanced dual-ribbon architecture.
Designed to eliminate cognitive load, it visually synthesizes trend direction, momentum shifts, and volatility extremes into one cohesive control panel, powered by a highly optimized, zero-lag backend.
⚙️ Core Mechanics
• Dynamic Volatility Bands: Eliminates the flaw of static overbought/oversold levels. By utilizing Bollinger Bands (1.5 & 2.0 Standard Deviations) mapped directly onto a smoothed RSI, the indicator highlights high-probability mean-reversion zones relative to recent market volatility.
• Dual-Ribbon Architecture: The Macro Ribbon defines the broader market regime (the background gradient), while the Micro Ribbon isolates immediate short-term momentum shifts. This intrinsic filtering ensures that scalping entries are strictly aligned with the dominant institutional flow.
• Algorithmic Divergence Detection: A hyper-sensitive, computation-optimized divergence engine (1-bar default lookback) automatically identifies both hidden and regular pivot shifts, offering deeper context into momentum exhaustion and trend continuations.
• Real-Time Pro Dashboard: A sleek, institutional-grade widget that actively tracks exact RSI mathematical values, immediate micro signals, and the overarching macro regime. It dynamically color-shifts to alert you the moment price enters overextended zones.
📖 How to Trade Like a Pro
This indicator is built to be an execution trigger, best paired with your existing support/resistance or supply/demand analysis on the main chart.
🟢 High-Probability Long (Buy) Setup:
1. Macro Filter: Ensure the background Macro Ribbon is trending upwards (above the 50 Mid Line).
2. Volatility Stretch: Look for the Smoothed RSI to dip into the bottom green Bollinger Band ribbon (80% transparent zone), indicating an oversold extreme relative to current volatility.
3. The Trigger: Enter when the Micro Ribbon turns Bullish (Green) and crosses above the Short MA. A Bullish Divergence label ("R" or "H") adds heavy confluence.
🔴 High-Probability Short (Sell) Setup:
1. Macro Filter: Ensure the background Macro Ribbon is trending downwards (below the 50 Mid Line).
2. Volatility Stretch: Look for the Smoothed RSI to push up into the top red Bollinger Band ribbon, indicating it is mathematically overextended.
3. The Trigger: Enter when the Micro Ribbon turns Bearish (Red) and crosses below the Short MA.
🛠️ Customization & Settings
The GCM RUS is highly modular. In the settings panel, you can adjust:
• Smoothing Types: Choose between 10 different moving average algorithms (LSMA, EMA, ALMA, etc.) for both the RSI and the Signal Line.
• Divergence Sensitivity: Adjust the Left/Right lookback periods (defaulted to an ultra-fast 1,1 for scalping).
• Dashboard Control: Instantly reposition the Pro Dashboard to any corner of your screen or adjust its text scaling to perfectly fit your monitor.
• Clean UI: All complex background matrix calculations are hard-coded to remain hidden from the Style tab, leaving you with only the core toggles.
Disclaimer:
This script is an analytical tool and does not constitute financial advice. Always backtest strategies and manage your risk.
HAPPY TRADING
________________________________________
(Explanation in Kannada Language/ ಕನ್ನಡ ಭಾಷೆಯಲ್ಲಿ ವಿವರಣೆ)
Title: GCM RSI ಅಲ್ಟ್ರಾ ಸ್ಕಾಲ್ಪರ್ (GCM RUS)
"ತಾಂತ್ರಿಕತೆಯ ಶಕ್ತಿ. ಟ್ರೇಡಿಂಗ್ನಲ್ಲಿ ನಿಖರತೆ."
-uniGram
📌 ಅವಲೋಕನ
GCM RSI ಅಲ್ಟ್ರಾ ಸ್ಕಾಲ್ಪರ್ ನಿಖರವಾದ ಟ್ರೇಡಿಂಗ್ಗಾಗಿ ವಿನ್ಯಾಸಗೊಳಿಸಲಾದ ಸಾಂಸ್ಥಿಕ-ಮಟ್ಟದ (institutional-grade) ಮೊಮೆಂಟಮ್ ಮತ್ತು ವೊಲಟಿಲಿಟಿ ಎಂಜಿನ್ ಆಗಿದೆ. ಬಲವಾದ ಟ್ರೆಂಡ್ಗಳಲ್ಲಿ ವಿಫಲವಾಗುವ ಸಾಂಪ್ರದಾಯಿಕ ಸ್ಟ್ಯಾಟಿಕ್ ಆಸಿಲೇಟರ್ಗಳಿಗಿಂತ ಭಿನ್ನವಾಗಿ, ಈ ಹೈಬ್ರಿಡ್ ಸಿಸ್ಟಮ್ ಅತ್ಯಾಧುನಿಕ ಡ್ಯುಯಲ್-ರಿಬ್ಬನ್ ಆರ್ಕಿಟೆಕ್ಚರ್ ಬಳಸಿ ಮಾರುಕಟ್ಟೆಯ ನೈಜ-ಸಮಯದ ಬದಲಾವಣೆಗಳಿಗೆ ಕ್ರಿಯಾತ್ಮಕವಾಗಿ ಹೊಂದಿಕೊಳ್ಳುತ್ತದೆ.
ಟ್ರೆಂಡ್ ದಿಕ್ಕು, ಮೊಮೆಂಟಮ್ ಬದಲಾವಣೆಗಳು ಮತ್ತು ಮಾರುಕಟ್ಟೆಯ ವೊಲಟಿಲಿಟಿಯನ್ನು ಒಂದೇ ಸ್ಕ್ರೀನ್ನಲ್ಲಿ ಸ್ಪಷ್ಟವಾಗಿ ತೋರಿಸುವ ಮೂಲಕ ಟ್ರೇಡರ್ಗಳಿಗೆ ತ್ವರಿತ ಮತ್ತು ನಿಖರ ನಿರ್ಧಾರ ತೆಗೆದುಕೊಳ್ಳಲು ಇದು ಸಹಾಯ ಮಾಡುತ್ತದೆ.
⚙️ ಮುಖ್ಯ ಲಕ್ಷಣಗಳು ಮತ್ತು ಕಾರ್ಯವಿಧಾನ
• ಡೈನಾಮಿಕ್ ವೊಲಟಿಲಿಟಿ ಬ್ಯಾಂಡ್ಗಳು: ಇದು ಸಾಂಪ್ರದಾಯಿಕ ಓವರ್ಬಾಟ್/ಓವರ್ಸೋಲ್ಡ್ (80/20) ಲೆವೆಲ್ಗಳ ದೋಷವನ್ನು ನಿವಾರಿಸುತ್ತದೆ. ಸ್ಮೂತ್ ಮಾಡಲಾದ RSI ಮೇಲೆ ನೇರವಾಗಿ ಬೋಲಿಂಜರ್ ಬ್ಯಾಂಡ್ಗಳನ್ನು (1.5 ಮತ್ತು 2.0 SD) ಅನ್ವಯಿಸುವ ಮೂಲಕ, ಮಾರುಕಟ್ಟೆಯ ವಾಸ್ತವಿಕ ವೊಲಟಿಲಿಟಿಗೆ ಅನುಗುಣವಾಗಿ ಹೈ-ಪ್ರಾಬಬಿಲಿಟಿ ರಿವರ್ಸಲ್ ವಲಯಗಳನ್ನು ನಿಖರವಾಗಿ ಗುರುತಿಸುತ್ತದೆ.
• ಡ್ಯುಯಲ್-ರಿಬ್ಬನ್ ಆರ್ಕಿಟೆಕ್ಚರ್: ಮ್ಯಾಕ್ರೋ ರಿಬ್ಬನ್ (ಹಿನ್ನೆಲೆಯ ಬಣ್ಣ) ಮಾರುಕಟ್ಟೆಯ ಪ್ರಮುಖ ಟ್ರೆಂಡ್ ಅನ್ನು ಸೂಚಿಸಿದರೆ, ಮೈಕ್ರೋ ರಿಬ್ಬನ್ ಅಲ್ಪಾವಧಿಯ ಮೊಮೆಂಟಮ್ ಬದಲಾವಣೆಗಳನ್ನು ಪ್ರತ್ಯೇಕಿಸುತ್ತದೆ. ಇದು ಪ್ರಮುಖ ಟ್ರೆಂಡ್ಗೆ ಅನುಗುಣವಾಗಿ ಮಾತ್ರ ಸ್ಕಾಲ್ಪಿಂಗ್ ಎಂಟ್ರಿಗಳನ್ನು ತೆಗೆದುಕೊಳ್ಳಲು ಖಚಿತಪಡಿಸುತ್ತದೆ.
• ಅಲ್ಗಾರಿದಮಿಕ್ ಡೈವರ್ಜೆನ್ಸ್ ಡಿಟೆಕ್ಷನ್: ಅತ್ಯಂತ ವೇಗವಾದ (zero-lag) ಡೈವರ್ಜೆನ್ಸ್ ಎಂಜಿನ್ (ಡೀಫಾಲ್ಟ್ 1-ಬಾರ್ ಲುಕ್ಬ್ಯಾಕ್) ಮಾರುಕಟ್ಟೆಯ ಹಿಡನ್ (hidden) ಮತ್ತು ರೆಗ್ಯುಲರ್ (regular) ಪಿವೋಟ್ ಬದಲಾವಣೆಗಳನ್ನು ಸ್ವಯಂಚಾಲಿತವಾಗಿ ಗುರುತಿಸಿ, ಟ್ರೆಂಡ್ ಅಂತ್ಯಗೊಳ್ಳುವ ಅಥವಾ ಮುಂದುವರೆಯುವ ಮುನ್ಸೂಚನೆಯನ್ನು ನೀಡುತ್ತದೆ.
• ರಿಯಲ್-ಟೈಮ್ ಪ್ರೊ ಡ್ಯಾಶ್ಬೋರ್ಡ್: ಇದು ಒಂದು ಸ್ಲೀಕ್ (sleek) ಮತ್ತು ವೃತ್ತಿಪರ ವಿಜೆಟ್ ಆಗಿದ್ದು, ನಿಖರವಾದ RSI ಮೌಲ್ಯ, ಮೈಕ್ರೋ ಸಿಗ್ನಲ್ ಮತ್ತು ಮ್ಯಾಕ್ರೋ ಟ್ರೆಂಡ್ ಅನ್ನು ನೈಜ-ಸಮಯದಲ್ಲಿ ಟ್ರ್ಯಾಕ್ ಮಾಡುತ್ತದೆ. ಮಾರುಕಟ್ಟೆ ಓವರ್ಬಾಟ್/ಓವರ್ಸೋಲ್ಡ್ ವಲಯಗಳನ್ನು ತಲುಪಿದಾಗ ಎಚ್ಚರಿಸಲು ಇದರ ಬಣ್ಣಗಳು ಸ್ವಯಂಚಾಲಿತವಾಗಿ ಬದಲಾಗುತ್ತವೆ.
📖 ವೃತ್ತಿಪರರಂತೆ ಟ್ರೇಡ್ ಮಾಡುವುದು ಹೇಗೆ
ಈ ಇಂಡಿಕೇಟರ್ ಅನ್ನು ಎಂಟ್ರಿ ಟ್ರಿಗ್ಗರ್ ಆಗಿ ಬಳಸಲು ವಿನ್ಯಾಸಗೊಳಿಸಲಾಗಿದೆ. ನಿಮ್ಮ ಮುಖ್ಯ ಚಾರ್ಟ್ನಲ್ಲಿರುವ ಸಪೋರ್ಟ್/ರೆಸಿಸ್ಟೆನ್ಸ್ (Support/Resistance) ಜೊತೆಗೆ ಇದನ್ನು ಬಳಸಿದಾಗ ಅತ್ಯುತ್ತಮ ಫಲಿತಾಂಶ ಸಿಗುತ್ತದೆ.
🟢 ಹೈ-ಪ್ರಾಬಬಿಲಿಟಿ ಲಾಂಗ್ (Buy) ಸೆಟಪ್:
1. ಮ್ಯಾಕ್ರೋ ಫಿಲ್ಟರ್: ಹಿನ್ನೆಲೆಯ ಮ್ಯಾಕ್ರೋ ರಿಬ್ಬನ್ ಮೇಲ್ಮುಖವಾಗಿರಬೇಕು (50 ಮಿಡ್ ಲೈನ್ನ ಮೇಲೆ).
2.ವೊಲಟಿಲಿಟಿ ಸ್ಟ್ರೆಚ್: ಸ್ಮೂತ್ ಮಾಡಲಾದ RSI ಕೆಳಗಿನ ಹಸಿರು ಬೋಲಿಂಜರ್ ಬ್ಯಾಂಡ್ ರಿಬ್ಬನ್ (80% ಪಾರದರ್ಶಕ ವಲಯ) ಒಳಗೆ ಪ್ರವೇಶಿಸುತ್ತದೆಯೇ ಎಂದು ಗಮನಿಸಿ. ಇದು ಪ್ರಸ್ತುತ ವೊಲಟಿಲಿಟಿಗೆ ಅನುಗುಣವಾಗಿ ಓವರ್ಸೋಲ್ಡ್ (oversold) ಸ್ಥಿತಿಯನ್ನು ಸೂಚಿಸುತ್ತದೆ.
3. ಟ್ರಿಗ್ಗರ್ (ಎಂಟ್ರಿ): ಮೈಕ್ರೋ ರಿಬ್ಬನ್ ಹಸಿರು ಬಣ್ಣಕ್ಕೆ ತಿರುಗಿ ಶಾರ್ಟ್ MA ಯನ್ನು ಮೇಲಕ್ಕೆ ಕ್ರಾಸ್ ಮಾಡಿದಾಗ ಎಂಟ್ರಿ ತೆಗೆದುಕೊಳ್ಳಿ. ಬುಲ್ಲಿಶ್ ಡೈವರ್ಜೆನ್ಸ್ ("R" ಅಥವಾ "H" ಲೇಬಲ್) ಇದ್ದರೆ ಅದು ನಿಮ್ಮ ಟ್ರೇಡ್ನ ಖಚಿತತೆಯನ್ನು ಹೆಚ್ಚಿಸುತ್ತದೆ.
🔴 ಹೈ-ಪ್ರಾಬಬಿಲಿಟಿ ಶಾರ್ಟ್ (Sell) ಸೆಟಪ್:
1. ಮ್ಯಾಕ್ರೋ ಫಿಲ್ಟರ್: ಹಿನ್ನೆಲೆಯ ಮ್ಯಾಕ್ರೋ ರಿಬ್ಬನ್ ಕೆಳಮುಖವಾಗಿರಬೇಕು (50 ಮಿಡ್ ಲೈನ್ನ ಕೆಳಗೆ).
2. ವೊಲಟಿಲಿಟಿ ಸ್ಟ್ರೆಚ್: ಸ್ಮೂತ್ ಮಾಡಲಾದ RSI ಮೇಲಿನ ಕೆಂಪು ಬೋಲಿಂಜರ್ ಬ್ಯಾಂಡ್ ರಿಬ್ಬನ್ ಒಳಗೆ ಪ್ರವೇಶಿಸುತ್ತದೆಯೇ ಎಂದು ಗಮನಿಸಿ. ಇದು ಓವರ್ಬಾಟ್ (overbought) ಸ್ಥಿತಿಯನ್ನು ಸೂಚಿಸುತ್ತದೆ.
3. ಟ್ರಿಗ್ಗರ್ (ಎಂಟ್ರಿ): ಮೈಕ್ರೋ ರಿಬ್ಬನ್ ಕೆಂಪು ಬಣ್ಣಕ್ಕೆ ತಿರುಗಿ ಶಾರ್ಟ್ MA ಯನ್ನು ಕೆಳಕ್ಕೆ ಕ್ರಾಸ್ ಮಾಡಿದಾಗ ಎಂಟ್ರಿ ತೆಗೆದುಕೊಳ್ಳಿ.
🛠️ ಗ್ರಾಹಕೀಕರಣ ಮತ್ತು ಸೆಟ್ಟಿಂಗ್ಗಳು (Customization)
GCM RUS ಅನ್ನು ಸುಲಭವಾಗಿ ಕಸ್ಟಮೈಸ್ ಮಾಡಬಹುದು. ಸೆಟ್ಟಿಂಗ್ಸ್ ಪ್ಯಾನೆಲ್ನಲ್ಲಿ ನೀವು ಈ ಕೆಳಗಿನವುಗಳನ್ನು ಬದಲಾಯಿಸಬಹುದು:
• ಸ್ಮೂಥಿಂಗ್ ಆಯ್ಕೆಗಳು: RSI ಮತ್ತು ಸಿಗ್ನಲ್ ಲೈನ್ಗಾಗಿ 10 ವಿಭಿನ್ನ ಮೂವಿಂಗ್ ಆವರೇಜ್ಗಳನ್ನು (LSMA, EMA, ALMA ಇತ್ಯಾದಿ) ಆಯ್ಕೆ ಮಾಡಬಹುದು.
• ಡೈವರ್ಜೆನ್ಸ್ ಸೆನ್ಸಿಟಿವಿಟಿ: ಲೆಫ್ಟ್/ರೈಟ್ ಲುಕ್ಬ್ಯಾಕ್ ಅವಧಿಗಳನ್ನು ಬದಲಾಯಿಸಬಹುದು (ಸ್ಕಾಲ್ಪಿಂಗ್ಗಾಗಿ ಡೀಫಾಲ್ಟ್ ಆಗಿ 1,1 ಗೆ ಹೊಂದಿಸಲಾಗಿದೆ).
• ಡ್ಯಾಶ್ಬೋರ್ಡ್ ಕಂಟ್ರೋಲ್: ಡ್ಯಾಶ್ಬೋರ್ಡ್ ಅನ್ನು ನಿಮ್ಮ ಸ್ಕ್ರೀನ್ನ ಯಾವುದೇ ಮೂಲೆಗೆ ಸುಲಭವಾಗಿ ವರ್ಗಾಯಿಸಬಹುದು ಮತ್ತು ಟೆಕ್ಸ್ಟ್ ಗಾತ್ರವನ್ನು ಸರಿಹೊಂದಿಸಬಹುದು.
• ಕ್ಲೀನ್ UI: ಟ್ರೇಡಿಂಗ್ಗೆ ಅಗತ್ಯವಿರುವ ಮುಖ್ಯ ಸೆಟ್ಟಿಂಗ್ಗಳನ್ನು ಮಾತ್ರ ಒದಗಿಸಿ, ಎಲ್ಲಾ ಸಂಕೀರ್ಣ ಲೆಕ್ಕಾಚಾರಗಳನ್ನು ಸ್ಟೈಲ್ (Style) ಟ್ಯಾಬ್ನಿಂದ ಮರೆಮಾಡಲಾಗಿದೆ.
ಹಕ್ಕು ನಿರಾಕರಣೆ:
ಈ ಸ್ಕ್ರಿಪ್ಟ್ ಒಂದು ವಿಶ್ಲೇಷಣಾತ್ಮಕ ಸಾಧನವಾಗಿದೆ ಮತ್ತು ಯಾವುದೇ ಆರ್ಥಿಕ ಸಲಹೆಯಲ್ಲ. ಟ್ರೇಡ್ ಮಾಡುವ ಮೊದಲು ಯಾವಾಗಲೂ ನಿಮ್ಮದೇ ಆದ ಬ್ಯಾಕ್ಟೆಸ್ಟ್ ಮಾಡಿ ಮತ್ತು ರಿಸ್ಕ್ ಮ್ಯಾನೇಜ್ಮೆಂಟ್ ಪಾಲಿಸಿ.
ಹ್ಯಾಪಿ ಟ್ರೇಡಿಂಗ್
Gösterge

Adaptive Volatility Matrix [JOAT]Adaptive Volatility Matrix
Introduction
The Adaptive Volatility Matrix (AVM) is an advanced open-source volatility regime classification indicator that combines Bollinger Band Width Percentile (BBWP), ATR percentile analysis, regime transition prediction, volatility clustering detection, and historical regime statistics to classify market conditions into distinct volatility regimes. This indicator helps traders adapt their strategies to current market conditions by systematically identifying when volatility is expanding, contracting, or transitioning between regimes.
Unlike basic volatility indicators that simply plot ATR or Bollinger Bands, AVM employs a sophisticated dual-metric system that combines BBWP (measuring price range compression/expansion) with ATR percentile (measuring absolute volatility) to create a combined volatility score (0-100%). The indicator then classifies this score into five distinct regimes and predicts regime transitions through momentum analysis.
Why This Indicator Exists
This indicator addresses the challenge of adapting trading strategies to volatility conditions. Different market regimes require different approaches - mean reversion works in low volatility, breakout strategies work in expansion, and risk management becomes critical in extreme volatility. AVM systematically reveals:
BBWP Analysis: Measures Bollinger Band width percentile to identify compression/expansion cycles
ATR Percentile: Tracks normalized ATR percentile to measure absolute volatility levels
Combined Volatility Score: Weighted average (60% BBWP, 40% ATR) for robust regime classification
Regime Classification: Five distinct regimes (Extreme Expansion, Expansion, Normal, Contraction, Extreme Contraction)
Transition Prediction: Momentum-based forecasting of next regime with probability
Volatility Clustering: Detects sustained high/low volatility periods
Historical Statistics: Tracks regime duration and frequency for context
Each component provides unique intelligence. BBWP shows compression cycles, ATR shows absolute volatility, combined score provides robust classification, regime system categorizes conditions, transition prediction anticipates changes, clustering detects persistence, and statistics provide historical context.
Core Components Explained
1. BBWP (Bollinger Band Width Percentile) Calculation
BBWP measures where current Bollinger Band width ranks relative to historical width:
f_calculate_bbwp(int length, int lookback) =>
float basis = ta.sma(close, length)
float dev = ta.stdev(close, length)
float bb_width = (dev * 2) / basis * 100
// Calculate percentile rank
int count = 0
for i = 1 to lookback
if bb_width > nz(bb_width )
count += 1
float bbwp = (count / lookback) * 100
BBWP ranges from 0-100%:
- 0-20%: Extreme compression (volatility squeeze)
- 20-40%: Contraction (below average volatility)
- 40-60%: Normal (average volatility)
- 60-80%: Expansion (above average volatility)
- 80-100%: Extreme expansion (volatility breakout)
2. ATR Percentile Analysis
ATR percentile measures where current normalized ATR ranks historically:
f_atr_percentile(int period, int lookback) =>
float atr_val = ta.atr(period)
float natr = close > 0 ? (atr_val / close) * 100 : 0.0
float percentile = ta.percentrank(natr, lookback)
Normalized ATR (NATR) accounts for price level differences, making volatility comparable across different price ranges. Percentile ranking shows where current volatility sits in historical distribution.
3. Combined Volatility Score & Regime Classification
The combined score weights BBWP more heavily than ATR percentile:
float combined_score = (bbwp_value * 0.6) + (atr_percentile * 0.4)
f_classify_regime(float bbwp_val, float atr_perc, float exp_th, float con_th, float ext_th) =>
string regime = "Normal"
int regime_code = 0
if bbwp_val >= ext_th or atr_perc >= ext_th
regime := "Extreme Expansion"
regime_code := 4
else if bbwp_val >= exp_th or atr_perc >= exp_th
regime := "Expansion"
regime_code := 3
// Additional classifications...
Five regime classifications:
1. Extreme Contraction (code 1): Both metrics <30%, volatility squeeze
2. Contraction (code 2): One metric <40%, below average volatility
3. Normal (code 0): Both metrics 40-60%, average conditions
4. Expansion (code 3): One metric >70%, above average volatility
5. Extreme Expansion (code 4): Both metrics >85%, volatility breakout
4. Regime Transition Prediction
AVM predicts next regime through momentum analysis:
float regime_momentum = combined_score - combined_score
string momentum_direction = regime_momentum > 2 ? "Accelerating" :
regime_momentum < -2 ? "Decelerating" : "Stable"
string predicted_regime = regime_code == 4 and regime_momentum < -5 ? "→ Expansion" :
regime_code == 3 and regime_momentum < -3 ? "→ Normal" :
// Additional predictions...
"Stable"
float transition_prob = math.min(math.abs(regime_momentum) * 10, 100)
Transition probability (0-100%) based on momentum magnitude. >50% probability triggers warning.
5. Volatility Clustering Detection
Clustering identifies sustained high/low volatility periods:
int cluster_lookback = 20
float cluster_threshold = 70.0
int high_vol_count = 0
for i = 0 to cluster_lookback - 1
if combined_score >= cluster_threshold
high_vol_count += 1
float cluster_ratio = high_vol_count / cluster_lookback * 100
bool in_vol_cluster = cluster_ratio >= 60 // 60% of bars are high vol
string cluster_strength = cluster_ratio >= 80 ? "Strong" :
cluster_ratio >= 60 ? "Moderate" :
cluster_ratio >= 40 ? "Weak" : "None"
Clusters indicate persistent volatility conditions that tend to continue.
6. Historical Regime Statistics
AVM tracks regime history for context:
var array regime_history = array.new_int(0)
var array regime_durations = array.new_int(0)
if regime_changed
array.push(regime_history, regime_code)
array.push(regime_durations, bars_in_regime)
// Calculate statistics
float avg_expansion_duration = exp_sum / exp_cnt
float avg_contraction_duration = con_sum / con_cnt
float duration_ratio = bars_in_regime / avg_expansion_duration
bool regime_extended = duration_ratio > 1.5
Statistics show if current regime is extended (>1.5x average duration), suggesting potential transition.
Visual Elements
Combined Score Line: Main plot (0-100%) with regime-based coloring
ATR Percentile Overlay: Circles showing ATR percentile for comparison
Histogram: Gradient-colored bars showing volatility score with regime colors
Reference Lines: 70% (expansion), 50% (neutral), 30% (contraction), 85% (extreme)
Background Zones: Regime-colored backgrounds (purple for expansion, yellow for contraction)
Transition Warnings: ⚠ symbols when transition probability >50%
BBWP Percentile Bands: 20th, 50th, 80th percentile circles for context
Dashboard: Real-time metrics including regime, score, BBWP, ATR%, trend, duration, momentum, transition prediction, cluster status, duration ratio, historical stats
Input Parameters
BBWP Parameters:
BBWP Length: Bollinger Band period (default: 13)
BBWP Lookback: Historical comparison period (default: 252)
ATR Analysis:
ATR Period: ATR calculation period (default: 14)
ATR Percentile Lookback: Historical ranking period (default: 100)
Regime Classification:
Expansion Threshold: Score for expansion regime (default: 70%)
Contraction Threshold: Score for contraction regime (default: 30%)
Extreme Threshold: Score for extreme regimes (default: 85%)
Visualization:
Show Regime Zones: Toggle background coloring
Show Histogram: Toggle volatility histogram
Show ATR Overlay: Toggle ATR percentile circles
How to Use This Indicator
Step 1: Identify Current Regime
Check dashboard "Regime" row. Adjust strategy based on classification.
Step 2: Monitor Combined Score
Score >70% = expansion (use breakout strategies)
Score <30% = contraction (use mean reversion)
Score 40-60% = normal (use balanced approach)
Step 3: Check Momentum Direction
"Accelerating" = volatility increasing
"Decelerating" = volatility decreasing
"Stable" = no significant change
Step 4: Watch for Transition Warnings
⚠ symbols indicate >50% probability of regime change. Prepare to adjust strategy.
Step 5: Assess Cluster Status
"Strong" or "Moderate" cluster = persistent conditions likely to continue
Step 6: Consider Duration Ratio
Ratio >1.5x = extended regime, higher probability of mean reversion
Best Practices
Use regime classification to select appropriate trading strategies
Extreme contraction often precedes volatility breakouts - prepare for expansion
Extreme expansion often mean-reverts - reduce position sizes
Transition warnings provide early signal to adjust risk management
Volatility clusters suggest persistence - don't fight the regime
Extended regimes (>1.5x average) have higher reversal probability
BBWP and ATR percentile divergence suggests regime uncertainty
Historical statistics provide context for current regime duration
Combine with directional indicators - AVM shows conditions, not direction
Indicator Limitations
Regime classification is backward-looking - transitions lag actual changes
BBWP calculation is computationally intensive on large lookback periods
Transition predictions are probabilistic, not deterministic
Extreme regimes can persist longer than expected during major events
Historical statistics require sufficient data (50+ regime changes)
Clustering detection has fixed lookback - may miss longer-term patterns
Combined score weighting (60/40) may not be optimal for all instruments
Regime thresholds may need adjustment for different markets
Technical Implementation
Built with Pine Script v6 using:
Custom BBWP calculation with percentile ranking
ATR percentile analysis with normalized ATR
Weighted combined score (60% BBWP, 40% ATR)
Five-tier regime classification system
Momentum-based transition prediction with probability
Volatility clustering detection (20-bar lookback)
Historical regime tracking with arrays (last 50 regimes)
Duration ratio calculation vs historical averages
BBWP percentile bands (20th, 50th, 80th)
Adaptive background coloring based on regime and duration
Comprehensive dashboard with 12 metrics
The code is fully open-source and can be modified to suit individual trading styles.
Originality Statement
This indicator is original in its comprehensive volatility regime classification approach. While BBWP and ATR are established concepts, this indicator is justified because:
It combines BBWP and ATR percentile into weighted combined score for robust classification
The five-tier regime system provides granular volatility categorization
Momentum-based transition prediction with probability quantification is unique
Volatility clustering detection identifies persistent regime conditions
Historical regime statistics provide context for current regime duration
Duration ratio calculation identifies extended regimes with mean reversion potential
BBWP percentile bands add additional context layers
Adaptive background intensity based on regime stability
Each component contributes unique information: BBWP shows compression cycles, ATR shows absolute volatility, combined score provides robust classification, regime system categorizes conditions, transition prediction anticipates changes, clustering detects persistence, statistics provide context, and duration ratio identifies extremes. The indicator's value lies in presenting these complementary perspectives simultaneously with unified regime framework.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Regime classifications do not guarantee future volatility behavior. Trading involves substantial risk of loss. Past performance does not guarantee future results. Always use proper risk management and never risk more than you can afford to lose.
-Made with passion by officialjackofalltrades Gösterge

Bollinger MTFThe Bollinger MTF indicator is a versatile volatility and trend analysis tool that allows traders to overlay Bollinger Bands from multiple timeframes onto a single chart. This provides a comprehensive view of market structure, identifying key support and resistance levels across various durations—from intraday scalping ranges to long-term institutional cycles.
By centralizing multi-timeframe (MTF) Bollinger Bands, this indicator eliminates the need to switch tabs constantly, allowing for better alignment checks and regime identification.
█ WHAT MAKES THIS ORIGINAL
1. Comprehensive MTF Integration
Unlike standard Bollinger Band indicators that only show a single timeframe, this tool supports up to seven simultaneous overlays:
- Chart BB: Matches the current chart resolution.
- Intraday: 15-minute and 1-hour.
- Swing: 4-hour and Daily.
- Macro: Weekly and Monthly.
2. Dynamic High-Visibility Design
Each timeframe is assigned a distinct, curated color palette with adjustable fills. This allows for clear "nesting" of bands, making it easy to identify when price is compressed within multiple timeframe extremes or expanding into a broad trend.
3. Optimized Data Fetching
The script uses efficient security calls with `barmerge.gaps_off` to ensure that higher-timeframe data is correctly aligned with the current chart without creating visual distortion or repainting artifacts on historical bars.
█ USAGE
Volatility Compression (Squeeze)
Look for areas where multiple timeframe bands are tightening simultaneously. This indicates a period of low volatility often followed by an explosive move. If the 4h and Daily bands are both squeezing, the subsequent breakout is likely to be significant.
Trend Alignment
A strong trend is often confirmed when price remains positioned between the basis line and the upper/lower bands of multiple timeframes. For example, a "Power Trend" occurs when price respects the 1h BB Upper while staying above the 4h BB Basis.
Mean Reversion Levels
The outer bands of higher timeframes (Daily/Weekly) act as significant exhaustion points. When price reaches a Weekly Band extreme during an intraday move, the probability of a reversal or consolidation increase substantially.
█ DETAILS
Calculation Logic
The core engine utilizes the standard `ta.bb` function, calculating the Simple Moving Average (SMA) and Standard Deviation (StdDev) for each requested timeframe. The results are then synchronized to the current chart using `request.security`.
Display Logic
The script features advanced plotting controls where each timeframe's visibility, color, and center-line display can be toggled independently. This allows for a clean workspace where only the most relevant tiers are visible.
█ SETTINGS
General BB Settings
- Length: The lookback period for the SMA and StdDev calculation (Default: 20).
- StdDev: The multiplier for the bands (Default: 2.0).
Timeframe Toggles
Each timeframe section (Chart, 15m, 1h, 4h, 1d, 1w, 1M) includes:
- Toggle: Enable or disable the specific timeframe.
- Colors: Independent selection for lines and fills.
- Center Line: Optional toggle to show the basis (SMA) line.
█ DISCLAIMER
This indicator is for informational purposes only and does not constitute financial advice. Trading involves significant risk. Always use a holistic approach that includes risk management and additional technical or fundamental confirmation.
Gösterge

Advanced Volatility Squeeze Pro v2 [identityKa]Overview
The Advanced Volatility Squeeze Pro v2 is a comprehensive breakout and momentum oscillator. It is designed to identify periods of market consolidation (volatility compression) and mathematically anticipate the direction of the ensuing breakout. This script improves upon traditional squeeze models by replacing the often-lagging linear regression momentum with a highly responsive dual-EMA momentum engine.
Core Mathematical Concepts
This indicator relies on the mathematical relationship between two distinct volatility envelopes:
Bollinger Bands (Standard Deviation): Calculates the standard deviation of price around a Simple Moving Average (default length 20, multiplier 2.0). These bands expand and contract rapidly based on immediate price variance.
Keltner Channels (True Range): Calculates an envelope based on the Simple Moving Average of the True Range (default multiplier 1.5). These bands are less sensitive to sudden spikes and represent the baseline volatility.
The Squeeze Logic (Dots)
The script continuously compares the width of the Bollinger Bands to the Keltner Channels:
Squeeze ON (Red Dots): Triggered when the Bollinger Bands completely contract inside the Keltner Channels. This signifies a severe drop in volatility. The market is consolidating, building energy for a future move.
Squeeze OFF (Gray Dots): Triggered when the Bollinger Bands expand back outside the Keltner Channels. This mathematical event is known as the squeeze "firing," indicating a release of volatility and the start of a new directional trend.
The Momentum Engine (Histogram)
To determine the direction of the breakout, the script calculates the spread between a Fast EMA (default 8) and a Slow EMA (default 21).
The histogram plots this exact difference.
A rising positive histogram (Bright Green) indicates accelerating bullish momentum, while a falling negative histogram (Bright Red) indicates accelerating bearish momentum.
HUD Dashboard & AI Logic
The on-chart panel aggregates these calculations into an actionable state:
Dangerous: Displayed whenever the Squeeze is "ON". This warns traders that the market is range-bound and breakout direction is mathematically uncertain.
LONG: Triggered when the Squeeze fires (OFF), the momentum is positive (Fast EMA > Slow EMA), and the momentum value is actively rising compared to the previous bar.
SHORT: Triggered when the Squeeze fires (OFF), the momentum is negative, and actively falling.
How to Use It
Traders should avoid entering trend-continuation setups while the red dots (Squeeze ON) are present. The optimal setup occurs when a red dot transitions to a gray dot (Squeeze fires) in confluence with the AI Suggestion outputting a clear "LONG" or "SHORT" signal, allowing the trader to capture the explosive expansion in volatility. Gösterge

Gösterge

Adaptive ALMA 2.0This script is a indicator that builds upon the Arnaud Legoux Moving Average (ALMA). Unlike a standard ALMA, which uses fixed settings, this version is "Adaptive" and "Evasive."
Here is a breakdown of what the code is doing:
1. The Adaptive Engine (Efficiency Ratio)
The core logic uses an Efficiency Ratio (ER) to measure market noise versus trend strength:
High Volatility/Clear Trend: The ER is high. The script automatically shortens the length and reduces the offset to make the line react faster (minimizing lag).
Low Volatility/Consolidation: The ER is low. The script increases the length and sigma to make the line smoother, preventing "whipsaws" (fake signals).
2. Global Evasion Engine (Noise Filtering)
This is the most unique part of the script. It uses two ATRs (Fast and Slow) to create a "Noise Zone":
Auto-Tune Evasion: It calculates a visual_noise_th (threshold). If the price is wiggling inside this gray/aqua band, the trend state won't change easily.
Volatility-Based Sensitivity: In "noisy" markets, it requires a larger price move (determined by d_atr) to flip the trend from Bullish to Bearish.
PS1: ATR is calculated on the full range of candle prices - open + close
3. Trend Logic & Signals
Bullish (Green): When the ALMA is rising, the price is above it, and the move exceeds the noise threshold.
Bearish (Red): When the ALMA is falling, the price is below it, and the move exceeds the noise threshold.
Neutral (Gray): When the price is stuck within the "Noise Band."
4. Extra Layers
It includes Medium (50) and Long (200) ALMA lines to give you a broader context of the trend (e.g., only taking Buy signals when the Long ALMA is also green).
Source: It uses a custom price source (open + close + close) / 3 to give more weight to the closing price while maintaining some "breath" from the open.
PS2: the sample chart is for BTC with a 5-minute interval
PS3: Works on any interval - you only need to adjust the parameters, default values are for fast-moving and liquid assets (e.g. BTC intervals 1 minute - 1 day and higher) and suggested Japanese candles (including Heikin Ashi) Gösterge

Adaptive Bollinger Bands [by Oberlunar]Adaptive Bollinger Bands by Oberlunar extends a classical Bollinger-style framework by building structured envelopes on highs and lows and then interpreting them through flow and regime context rather than through band touches alone. The script combines two moving-average bases, adaptive volume-distribution logic above and below price, a normalized TRIX component, and a multi-timeframe directional filter to distinguish between mean-reversion conditions and breakout conditions in a more organized way.
Its original value is not in any single component taken in isolation, but in the way these elements are fused into one coherent visual system. The bands define the price structure, the heatmap and tape show where directional pressure is stronger, the regime engine helps separate quieter rejection environments from more persistent expansion, and the support, resistance, and compression areas help mark zones where market behavior becomes more interpretable.
The indicator is designed to be read directly on standard charts. It does not use future-looking logic, and higher-timeframe requests are made with no lookahead. It is meant as a decision-support tool for chart reading, not as a promise of performance or as a substitute for risk management.
A common way to use the script is to observe how price behaves when it reaches the outer parts of the envelope and then compare that location with the active regime, the side-specific flow, and the multi-timeframe bias. In quieter conditions, signals near the edge of the channel can be interpreted as possible rejection areas. In stronger directional conditions, the same area can instead be read as part of a continuation or breakout sequence. The heatmap and tape help show whether pressure is building above or below price, while the marked zones can help the user keep track of relevant local structure.
Enjoy
by Oberlunar ✦👁 Gösterge

Dual Bollinger Trend Oscillator - BBTrend | TR🎯 Overview
Dual Bollinger Trend Oscillator - BBTrend | TR is an innovative oscillator developed by Tiagorocha1989 that leverages two Bollinger Bands® with different periods and standard deviation multipliers to create a unique measure of trend strength and momentum. By comparing the relative positions of short‑term and long‑term bands, BBTrend captures the expansion or contraction of volatility in a way that highlights underlying trend dynamics. With dual display modes (histogram or line), a comprehensive moving average engine, and rich visual customization, this indicator helps traders identify trend direction, strength, and potential reversals with clarity.
🔧 How It Works
BBTrend is built upon two classic Bollinger Bands calculations applied to the same price source:
Short Bollinger Bands – length Short_Len_BB, multiplier Short_Mult_BB
Long Bollinger Bands – length Long_Len_BB, multiplier Long_Mult_BB
From these bands, the indicator computes the absolute differences between the lower bands (shortLo and longLo) and between the upper bands (shortUp and longUp). The core oscillator value is then:
text
BBTrend = (abs(shortLo - longLo) - abs(shortUp - longUp)) / shortMid * 100
where shortMid is the middle line of the short Bollinger Bands (used for normalisation). The result is a dimensionless oscillator that oscillates around zero:
BBTrend > 0 → The gap between lower bands exceeds the gap between upper bands, typically associated with bullish momentum.
BBTrend < 0 → The gap between upper bands exceeds the gap between lower bands, typically associated with bearish momentum.
The indicator can be displayed either as a histogram (default) or as a line. When shown as a histogram, four shades of the bullish/bearish colours indicate the strength of the trend based on whether the value is increasing or decreasing.
An optional moving average (MA_BB) of the BBTrend line can be added (enabled via showMA). Crossovers between BBTrend and this MA provide additional trading signals.
✨ Key Features
🔹 Dual Display Modes
Histogram Mode (default): Visualises BBTrend as coloured columns. The colour intensity reflects trend strength:
Dark shades → strong momentum (value increasing in the same direction)
Light shades → weakening momentum (value decreasing towards zero)
Line Mode: Plots BBTrend as a continuous line, coloured by its position relative to its moving average.
🔹 Customizable Bollinger Bands
Separate control over short and long Bollinger Bands:
Short BB Length (default 10) and Short StdDev (default 1.0)
Long BB Length (default 50) and Long StdDev (default 2.0)
Price Source (default Close)
🔹 Moving Average Engine
When enabled, the indicator plots a moving average of BBTrend with 12 selectable types:
EMA, SMA, RMA, WMA, VWMA, HMA, DEMA, TEMA, TRIMA, FRAMA, SWMA, T3
The T3 MA includes an adjustable T3 Factor for fine‑tuning smoothness.
🔹 Crossover Signals
Zero‑Line Crossovers: Triangles appear on the price chart when BBTrend crosses above or below zero (bullish/bearish signals).
MA Crossovers: When showMA is true, small circles mark crossovers between BBTrend and its moving average.
🔹 Comprehensive Visual Feedback
Color‑Coded Histogram/Line: Uses one of eight color themes (Classic, Modern, Robust, etc.) for bullish and bearish states.
Dynamic Zone Fills: Semi‑transparent fills between the BBTrend line and its moving average when line mode is active.
Background Shading: The chart background changes colour based on the prevailing bias (bullish/bearish).
Color‑Coded Candles: Bars reflect the current BBTrend bias (above/below zero in histogram mode, or above/below MA in line mode).
Live Value Display: Current BBTrend value shown in a floating label near the last bar.
Trend Table: Bullish/Bearish status displayed in a table on the chart.
🔹 Ready‑to‑Use Alerts
Built‑in alert conditions trigger LONG on bullish zero‑line crossovers and SHORT on bearish zero‑line crossovers, as well as for MA crossovers when enabled.
⚙️ Settings Summary
Setting Description Default
Color Choice Select from eight visual themes Classic
Show Histogram If true, display as histogram; if false, as a line true
Show Moving Average Display the moving average of BBTrend false
Price Source Source for Bollinger Bands calculations Close
Short BB Length Period for short Bollinger Bands 10
Long BB Length Period for long Bollinger Bands 50
Short StdDev Standard deviation multiplier for short bands 1.0
Long StdDev Standard deviation multiplier for long bands 2.0
Length MA Moving average period for BBTrend 14
Moving Average Type of moving average (12 options) EMA
T3 Factor Factor for T3 moving average (0–1) 0.7
📈 Practical Applications
🔹 Trend Direction Identification
The sign of BBTrend provides a clear directional bias:
Positive values → bullish trend
Negative values → bearish trend
The magnitude indicates trend strength, with larger absolute values reflecting stronger momentum.
🔹 Zero‑Line Crossovers
Crossovers above/below zero offer simple, intuitive signals:
Crossover above zero → bullish momentum strengthening, potential trend reversal up.
Crossunder below zero → bearish momentum strengthening, potential trend reversal down.
These are highlighted by triangle markers on the price chart.
🔹 Signal‑Line Crossovers (MA Mode)
When the moving average is enabled, crossovers between BBTrend and its MA provide filtered signals:
BBTrend crosses above its MA → bullish signal.
BBTrend crosses below its MA → bearish signal.
These signals help reduce whipsaws in choppy markets.
🔹 Trend Strength & Momentum
The histogram’s shading reveals momentum acceleration:
Darkening colours → increasing momentum in the current direction.
Lightening colours → momentum slowing, possible trend exhaustion or reversal.
🔹 Divergence Trading
Like many oscillators, BBTrend can form divergences with price:
Bullish Divergence: Price makes a lower low while BBTrend makes a higher low → potential upside reversal.
Bearish Divergence: Price makes a higher high while BBTrend makes a lower high → potential downside reversal.
Divergences are most significant when BBTrend is at extreme levels (far from zero).
🔹 Multiple Timeframe Analysis
Compare BBTrend readings across different timeframes: higher‑timeframe BBTrend defines the primary trend direction, while lower‑timeframe BBTrend can be used for entry timing.
🎯 Ideal For
✅ Bollinger Bands Enthusiasts looking for a novel way to compare short‑term and long‑term volatility.
✅ Trend Traders seeking a clear, visual representation of trend direction and strength.
✅ Momentum Traders wanting to measure acceleration and deceleration.
✅ Divergence Traders who rely on oscillator‑price divergences for reversals.
✅ Swing Traders capturing medium‑term trend shifts.
✅ System Developers needing a customisable, dual‑signal oscillator.
✅ Beginner Traders who appreciate straightforward signals and colour‑coded visuals.
📌 Key Takeaways
Dual Bollinger Concept: Combines short and long Bollinger Bands to create a unique momentum oscillator.
Dual Display Modes: Choose histogram (with strength shading) for quick visual assessment, or line mode with moving average for crossover‑based trading.
Normalised Scale: Values are normalised by the short middle band, making readings comparable across instruments and timeframes.
Extensive MA Options: 12 moving average types give complete control over signal smoothing.
Rich Visuals: Colour themes, intensity‑shaded histogram, candle colouring, and background fills provide immediate market context.
Divergence Capability: The oscillator’s unbounded nature makes it suitable for spotting regular and hidden divergences.
Alert‑Ready: Pre‑built alerts for both zero‑line and MA crossovers.
⚠️ Important Notes
BBTrend is an unbounded oscillator; its scale can vary depending on market volatility and the chosen Bollinger Bands parameters. The zero line remains the fixed reference.
The default parameters (short: 10/1.0, long: 50/2.0) are a starting point. Adjust them to match your trading style and instrument characteristics.
When using the moving average, the default length of 14 offers a balanced response; longer lengths smooth the line but increase lag.
Divergences should be confirmed with other technical tools and are most reliable after extended trends.
Always combine BBTrend with proper risk management and additional confirmation before live deployment.
Disclaimer: This indicator is provided for educational and informational purposes only. Past performance does not guarantee future results. Always test thoroughly and align with your personal risk management strategy. Gösterge

Gösterge

Gösterge

Gösterge

Gösterge

Liquidity Bands1. CONCEPT & PURPOSE
Liquidity Bands is a volume-weighted volatility envelope indicator. Unlike standard Bollinger Bands that use a Simple Moving Average and equal-weighted standard deviation, this indicator weights every price observation by its liquidity (volume × true range). This means:
High-volume, high-volatility bars have a stronger influence on the bands
Low-volume, quiet bars contribute less to the calculation
The bands naturally gravitate toward price levels where real trading activity occurred
This makes the bands more responsive to institutional activity and genuine supply/demand zones rather than treating every bar equally.
2. CORE CALCULATIONS
2.1 Liquidity Proxy
text
liquidity = volume × true_range
Each bar's "weight" is determined by multiplying its volume by its true range. This captures dollar-flow intensity — a bar with high volume AND wide range represents significant market participation. If volume is unavailable (e.g., some crypto pairs), it defaults to 1 so the indicator still functions.
2.2 Liquidity-Weighted Moving Average (LMA)
text
LMA = Σ(price × liquidity, n) / Σ(liquidity, n)
Instead of a simple average where each bar counts equally, the LMA is a weighted mean where high-liquidity bars pull the average toward their price level more strongly. This is the center line (basis) of the bands.
Interpretation:
LMA represents the fair value based on where the most trading activity occurred
Price above LMA → bullish bias
Price below LMA → bearish bias
2.3 Liquidity-Weighted Standard Deviation
text
variance = Σ(price² × liquidity, n) / Σ(liquidity, n) − LMA²
std_dev = √variance
The standard deviation is also liquidity-weighted, meaning volatility is measured relative to where liquidity actually participated, not just raw price swings.
2.4 Band Construction
Band Formula Purpose
Upper Band LMA + (mult × std_dev) Overbought / resistance zone
Lower Band LMA − (mult × std_dev) Oversold / support zone
Inner Upper LMA + (inner_mult × std_dev) First standard deviation — early warning
Inner Lower LMA − (inner_mult × std_dev) First standard deviation — early warning
Default multipliers: Outer = 2.0, Inner = 1.0
This creates four zones:
Above upper band → extreme overbought
Upper band to inner upper → overbought zone
Inner upper to inner lower → neutral / fair value zone
Inner lower to lower band → oversold zone
Below lower band → extreme oversold
3. SIGNAL MODES
3.1 Mean Reversion Mode
Philosophy: Price tends to return to the mean after touching extremes.
Signal Condition Logic
LONG Previous close was at or below the lower band, current close is back above it Price was rejected at the lower extreme and is recovering — buy the bounce
SHORT Previous close was at or above the upper band, current close is back below it Price was rejected at the upper extreme and is fading — sell the rejection
Best used in: Ranging/sideways markets, mean-reverting instruments, when squeeze is active.
3.2 Breakout Mode
Philosophy: When price breaks through the bands with conviction, momentum follows.
Signal Condition Logic
LONG Price crosses above the upper band Bullish momentum breakout — buy the strength
SHORT Price crosses below the lower band Bearish momentum breakdown — sell the weakness
Best used in: Trending markets, after a squeeze, high-momentum instruments.
3.3 Both Mode
Fires signals from either mode. Useful for scanning all opportunities but requires additional context/filtering to avoid conflicting signals.
3.4 LMA Cross Signals (Optional)
Signal Condition
Cross Up Price crosses above the LMA basis line
Cross Down Price crosses below the LMA basis line
These are secondary/confirmation signals — a diamond shape appears. Useful for:
Confirming a mean reversion signal (price bounced off band AND crossed back above LMA)
Identifying trend direction shifts
4. BAND WIDTH & SQUEEZE DETECTION
4.1 Band Width
text
band_width = (upper_band − lower_band) / LMA × 100
Expressed as a percentage of the LMA, this normalizes volatility across different price levels and instruments. A 5% band width means the bands span 5% of the current price level.
4.2 Squeeze Detection
text
squeeze = band_width < lowest(band_width, 50) × 1.05
A squeeze is detected when the current band width is within 5% of the lowest band width in the last 50 bars. This means volatility has contracted to near-historic lows for the recent window.
What it means:
Energy is building — a large move is likely coming
Direction is unknown — wait for breakout confirmation
Displayed as a soft orange/yellow background tint across the chart
4.3 Expansion Detection
text
expansion = band_width > highest(band_width , 20) × 0.95
Bands are expanding when width is near the 20-bar high. This confirms an active trend/momentum move is underway.
4.4 Price Position Ratio
text
ratio = (close − lower_band) / (upper_band − lower_band)
Gives a 0–100% reading of where price sits within the bands:
0% = at the lower band
50% = at the LMA
100% = at the upper band
>100% = above upper band
<0% = below lower band
Displayed as a visual gauge bar ████░░░░░░ 40% in the dashboard.
5. VISUAL SYSTEM
5.1 Color Themes
Theme Character Upper Lower Best For
Cyber Futuristic neon Cyan #00e5ff Pink #ff006e Dark charts
Ocean Cool aquatic Teal #00b4d8 Deep blue #0077b6 Clean look
Lava Hot aggressive Orange #ff6b35 Red #d90429 High energy
Frost Soft pastel Light blue #a2d2ff Pale blue #bde0fe Light charts
Neon Maximum contrast Green #39ff14 Red #ff073a Visibility
Each theme defines a coordinated 7-color palette (upper, lower, basis, bull, bear, squeeze, accent) so everything matches.
5.2 Glow Effect
Three concentric layers are drawn behind each band line:
Layer Opacity Width Effect
Outer glow 92% transparent 6px Soft ambient halo
Mid glow 82% transparent 4px Intermediate diffusion
Inner glow 60% transparent 2px Concentrated glow
Core line 0% transparent 1px Sharp band edge
This creates a neon light tube effect around each band.
5.3 Zone Fills
Five separate fill regions create depth:
Zone Between Opacity Meaning
Upper zone Upper band → Inner upper 88% Overbought territory
Lower zone Lower band → Inner lower 88% Oversold territory
Core zone Inner upper → Inner lower 95% Fair value area
Upper half Upper band → LMA 94% Subtle upper bias tint
Lower half Lower band → LMA 94% Subtle lower bias tint
5.4 Dynamic Basis Color
The LMA line color shifts in real-time based on price position:
When price is near the lower band → basis turns lower band color
When price is near the upper band → basis turns upper band color
This creates an instant visual read of where price sits
5.5 Signal Visualization (Triple-Layer)
Each signal has three visual layers for maximum clarity:
Layer Element Purpose
Primary Large ▲/▼ triangle with bold "LONG"/"SHORT" text Unmissable directional signal
Accent Small circle dot at the same location Adds visual weight and layering
Context Dotted horizontal line spanning ±1 bar Marks the exact price level of the signal
Background Full-bar bgcolor tint (green/red) Makes signal bars visible even when zoomed out
5.6 Band Touch Markers
Small xcross shapes appear when price first touches a band without triggering a full signal. These serve as early warnings that price is testing an extreme.
5.7 LMA Dot Trail (Optional)
When enabled, alternating dots • appear on the LMA line every other bar, creating a stylized beaded line effect instead of a solid line.
6. DASHBOARD
A real-time information panel displayed in the corner with alternating dark row backgrounds:
Row Left Column Right Column Color Logic
Header ⚡ LIQUIDITY BANDS ━━━━━━ Theme accent
Theme Theme Active theme name + ● Upper band color
Mode Mode Active signal mode Accent color
Width Width Band width as % Orange if squeeze, green if expanding, gray if normal
Status Status ⊘ SQUEEZE / ⊕ EXPANDING / ◎ NORMAL Contextual color
Price Price ▲ ABOVE / ▼ BELOW / ◈ INSIDE Green/red/white
Ratio Ratio ████░░░░░░ 40% gauge bar Gradient from lower to upper band color
7. ALERTS
Alert Fires When
Long Signal Any long condition triggers (based on selected mode)
Short Signal Any short condition triggers (based on selected mode)
LMA Cross Up Price crosses above the LMA
LMA Cross Down Price crosses below the LMA
Squeeze Band width hits squeeze threshold
All alert messages include the ticker symbol via {{ticker}}.
8. INPUT REFERENCE
Input Default Range Description
Lookback Length 20 1+ Number of bars for LMA and std dev calculation
StdDev Multiplier 2.0 0.1+ Width of outer bands (higher = wider)
Price Source Close Any Which price to use for calculations
Inner Band Multiplier 1.0 0.1+ Width of inner bands
Signal Mode Mean Reversion 3 options Which signal logic to use
Show Signals ✓ Toggle Display signal markers
Show LMA Cross ✗ Toggle Display LMA cross diamonds
Color Theme Cyber 5 options Visual color scheme
Band Glow Effect Gösterge
