Squeeze Bollinger Bands Tracker [MarkitTick]💡 This institutional-grade analysis suite provides a sophisticated volatility-tracking environment designed to identify market compression phases and high-conviction breakouts. By integrating Bollinger Band standard deviation logic with Z-Score normalization and a non-linear sigmoid volatility engine, the script transforms raw price action into a multi-dimensional heatmap. This approach allows traders to distinguish between low-volatility "coiling" phases and institutional-driven momentum expansions, providing a clear visual representation of market energy.
● ✨ Originality and Utility
The Squeeze Bollinger Bands Tracker distinguishes itself through the implementation of a proprietary "Signal Engine" and a non-linear volatility grading system. Unlike standard Bollinger Band indicators that merely plot static lines, this tool actively monitors the rate of change in channel width relative to its own historical standard deviation.
• Dynamic Volatility Normalization
Most indicators rely on linear calculations that fail to account for the exponential nature of market expansion. This script utilizes a Z-Score calculation to determine how extreme a volatility move is compared to its history, then maps that value through a sigmoid function. This creates a "Heatmap" effect on the candles that reflects institutional participation levels rather than simple price movement.
• Institutional Breakout Grading
The utility is further enhanced by an automated grading system (Grades A, B, and C). By cross-referencing price spread (the distance between open and close) with actual volume metrics during a breakout, the script provides an objective measure of signal quality, helping traders filter out "fakeouts" that lack volume support.
● 🔬 Methodology and Concepts
The logic flow is divided into three core analytical pillars: Compression Detection, Momentum Normalization, and Signal Verification.
• Compression Detection (The Squeeze)
The script calculates the percentage-based width of the Bollinger Bands. When the current width falls below its SMA-based average, the market is classified as being in a "Squeeze" state. This signifies a period where market energy is being stored, often preceding a significant directional expansion.
• Sigmoid-Mapped Z-Score Volatility
To provide the neon heatmap coloring, the script calculates the Z-Score of the channel width. This tells us how many standard deviations the current volatility is from the mean. This Z-Score is then processed through a Sigmoid Function: 100 / (1 + exp(-Z-Score)). This mathematical transformation squashes the infinite Z-Score range into a 0–100 scale, creating a smooth gradient for the "True Institutional Heatmap."
• Breakout Validation Engine
Signals are not generated simply on a price cross. The Signal Engine (a custom User-Defined Type) calculates real-time Entry, Stop Loss (based on the previous basis line), and Take Profit levels. During the moment of crossover, the "calcGrade" method evaluates if the current bar's spread and volume are at least 150% of their historical averages to assign a Grade A "Institutional" breakout.
● 🎨 Visual Guide
The visual interface is designed with a high-contrast "3D Neon" aesthetic to ensure critical data points are immediately recognizable during fast-moving market conditions.
• The 3D Neon Channels
Upper Core & Glow: The upper Bollinger Band is rendered in Cyan (#00FFFF). It features three layers: a 2-pixel core for precision and two wider "Glow" layers with varying transparency (60% and 85%) to create a neon effect.
Lower Core & Glow: The lower band is rendered in Magenta (#FF00FF), following the same three-layer glow architecture to signify the support boundary.
Basis Core: The central moving average is rendered in Yellow (#FFFF00), acting as the dynamic mean and the primary stop-loss anchor.
• True Institutional Heatmap Candles
The candle colors are not fixed; they represent a gradient based on the Sigmoid Volatility score.
Bullish State: Transitions from a deep "Cold" Forest Green (#004D40) during low-volatility rises to a "Hot" Neon Green (#00FF00) during high-momentum surges.
Bearish State: Transitions from a deep "Cold" Purple (#4A148C) during low-volatility drops to a "Hot" Neon Red (#FF0000) during aggressive sell-offs.
Neutral State: Gray (#808080) candles appear when no definitive trend state is identified by the Signal Engine.
• Analytical Dashboard and Labels
Buy/Sell Labels: When a breakout occurs, a Cyan or Magenta label appears. It displays the signal Grade (A, B, or C) and the calculated E (Entry), TP (Take Profit), and SL (Stop Loss) values.
Institutional Analytics Dashboard: Located in the top-right, this table provides real-time data on Trend Maturity (in bars), Volatility State (Squeeze vs. Expanding), and the percentage proximity to the upper and lower breakout levels.
● 🔍 Deconstruction of the Underlying Scientific and Academic Framework
The indicator is built upon the foundation of Statistical Process Control and Information Theory. By treating price movement as a signal-to-noise problem, the script uses the following frameworks:
• Standard Deviation and Gaussian Distribution
The core of the Bollinger Band calculation relies on the assumption that price spends approximately 95% of its time within two standard deviations of the mean. The "Squeeze" logic identifies periods where the distribution is abnormally tight, suggesting an imminent return to the mean or a "Fat Tail" event (a breakout).
• Z-Score Normalization
In statistics, the Z-Score is used to compare observations from different data sets or time periods. By applying Z-Score logic to the width of the bands, the indicator removes the "unit" of price and focuses purely on the intensity of the volatility, allowing for a standardized comparison across different assets (e.g., Bitcoin vs. Apple).
• Non-Linear Sigmoid Mapping
The use of the Sigmoid function (common in Neural Network activation) serves to eliminate outliers in volatility data. This ensures that the candle heatmap provides meaningful color variations even during extreme "Black Swan" events, preventing the visual output from becoming saturated or unreadable.
● 📖 How to Use
Traders should focus on the transition between market states as displayed by the Analytics Dashboard and the Heatmap.
• Step 1: Identify the Squeeze
Monitor the "Volatility State" in the dashboard. When it displays "⚠️ SQUEEZE" in Neon Orange, the market is coiling. This is the preparation phase where no trades should be taken.
• Step 2: Evaluate the Breakout Grade
Wait for a "BUY" or "SELL" label to appear. Priority should be given to "Grade A" signals, as these indicate that both price spread and volume have significantly exceeded their 20-period averages, confirming institutional intent.
• Step 3: Execution and Risk Management
Upon a valid signal, the script provides an automated trade plan. The Stop Loss is set at the Basis (Yellow) line from the previous bar to allow for minor breathing room, while the Take Profit is projected at a 1:1 ratio relative to the width of the band at the time of entry.
● ⚙️ Inputs and Settings
The script provides granular control over the analytical engine and the visual experience.
• Channel Settings
Channel Length: Controls the SMA window for the Bollinger Bands (Default: 20).
Standard Deviation Multiplier: Adjusts the width of the neon boundaries (Default: 2.0).
• Analytics Settings
Squeeze/Z-Score Length: Determines the lookback period used to define what constitutes "average" volatility (Default: 50).
Quality SMA Length: Defines the window for the Grade A/B/C volume and spread verification (Default: 20).
• Color and Heatmap Settings
Users can fully customize the Neon Upper/Lower colors, the Dashboard background transparency, and the specific "Cold" and "Hot" thresholds for the candle gradient engine to match their preferred dark or light chart theme.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion.
Индикатор Pine Script®






















