AG Pro Bollinger Bands Squeeze Map [AGPro Series]AG Pro Bollinger Bands Squeeze Map
Overview
AG Pro Bollinger Bands Squeeze Map is a Bollinger-based compression and release mapping tool designed to show how volatility contracts, matures, expands, and sometimes fails directly on price.
Instead of reducing the entire process to a simple binary squeeze dot, this script organizes the behavior into a visual regime map. It tracks when compression is only beginning, when it becomes more meaningful, when it reaches deeper squeeze conditions, and when price transitions into a release phase. It also highlights failed releases and re-compression behavior, which can be useful when an expansion loses follow-through and the market slips back into a tighter volatility regime.
The goal of the script is not to predict the next move in advance, and it is not presented as a standalone trade system. Its purpose is to provide structured context around Bollinger Band compression so the user can evaluate whether the market is still coiling, already expanding, or losing expansion quality after an initial move.
This script is plotted directly on the chart and is built to remain readable without requiring a separate lower panel. The design prioritizes chart-first interpretation, moderate visual hierarchy, and state clarity.
Unique Edge
Many Bollinger squeeze tools stop at a yes/no condition or a single timing marker. This script takes a broader approach.
Its primary difference is that it treats squeeze behavior as a sequence of states rather than as a single event. That means the script does not only ask whether a squeeze exists. It also asks:
- Is compression only building, or is it already active?
- Has the squeeze become deep or mature?
- Did the first release show better or weaker expansion quality?
- Did the move fail and rotate back toward the basis?
- Is the market entering a re-compression phase after release?
This state-based mapping framework is the main distinction of the indicator. The intent is to help the user see volatility structure more clearly, rather than to provide a simplistic breakout label.
What the Script Does
The script combines Bollinger Band structure, normalized band width, width percentile logic, optional Keltner Channel confirmation, and release-state scoring into a single on-chart map.
In practice, the indicator can highlight:
- Building Compression
- Active Squeeze
- Deep Squeeze
- Mature Squeeze
- Up Release
- Down Release
- Failed Release
- Re-Compression
The result is a visual progression from contraction to expansion, with added context about the quality of that transition.
Methodology
1) Bollinger Band Structure
The script begins with a standard Bollinger Band framework built from a basis line and upper/lower deviations. This establishes the primary price envelope used throughout the tool.
2) Normalized Band Width
Raw band width is normalized relative to the basis so that compression can be assessed more consistently across changing price levels.
3) Width Percentile Regime Detection
The script evaluates current band width against a lookback window using percentile rank logic. This allows the user to frame current compression relative to recent history rather than relying only on absolute width values.
4) Optional Keltner Confirmation
An optional Keltner containment component can be used to strengthen squeeze filtering. Depending on the selected mode, the script can use percentile logic, Keltner logic, or a hybrid of both.
5) Compression State Classification
Compression is not handled as one flat condition. The script distinguishes between building compression, active squeeze, deep squeeze, and mature squeeze based on percentile thresholds and persistence.
6) Release Quality Scoring
When price exits a squeeze state, the script evaluates the release using a score that incorporates bar body behavior, close location, width expansion, distance from basis, and wick influence. The output is grouped into quality labels such as Weak, Clean, or Strong.
7) Failed Release Logic
A release is not automatically treated as durable. If the move loses structure and rotates back through the basis within the monitoring window, the script can classify that behavior as a failed release.
8) Re-Compression Detection
After release, markets do not always trend cleanly. Sometimes they compress again. The re-compression logic is included to identify this return into tighter volatility conditions.
Signals and Alerts
The script includes deterministic alert conditions tied to state transitions. These alerts are intended to notify the user when a specific structural condition appears on the chart.
Available alert categories include:
- Active Squeeze
- Deep Squeeze
- Mature Squeeze
- Up Release
- Down Release
- Failed Release
- Re-Compression
These alerts describe indicator states. They are not guarantees of continuation, reversal, or trade outcome.
Visual Design
The indicator is designed to work as an on-chart map rather than as a lower-pane oscillator.
The visual structure includes:
- Bollinger Bands
- Optional Keltner Channel
- Compression and release zone fills
- State labels
- Compact information panel
The zone rendering is intentionally state-weighted. More important states such as release, deeper squeeze regimes, and failure/re-compression conditions receive stronger visual emphasis, while lower-priority compression states can remain lighter to reduce chart clutter.
Key Inputs
The script includes adjustable controls for:
- Detection mode
- Bollinger Band length and multiplier
- Percentile lookback and thresholds
- Keltner Channel length and ATR multiplier
- Minimum bar requirements for deeper squeeze states
- Release persistence window
- Failure and re-compression windows
- Label size and offset
- Band and channel visibility
- Map intensity
- Theme selection
- Panel position and font size
These controls allow the user to adapt the script to different assets, volatility profiles, and charting preferences.
How to Interpret It
A practical way to read the script is to think in phases.
When the indicator shows Building Compression, volatility is tightening but may not yet be at a stronger squeeze threshold.
When the indicator shifts into Active, Deep, or Mature squeeze conditions, compression is becoming more statistically notable relative to the selected lookback.
When a release label appears, the script is identifying a transition out of compression. The associated quality label is meant to describe the character of that release, not to certify future follow-through.
If a failed release appears, the script is signaling that the initial expansion did not maintain structure within the observation window.
If re-compression appears, the market may be moving from expansion back into tighter volatility conditions.
This framework is often more useful for context and filtering than for isolated signal-chasing.
Use Cases
This tool may be useful for users who want to:
- study volatility contraction and expansion directly on price
- compare weaker and cleaner releases after squeeze conditions
- identify failed expansion behavior
- add context to existing discretionary workflows
- use squeeze structure as a filter rather than a complete decision engine
It can also be used alongside structure analysis, trend analysis, support/resistance mapping, or broader workflow-based chart review.
Limitations and Transparency
This script is a volatility-structure tool. It is not a prediction engine and does not forecast future price direction with certainty.
Several important limitations should be kept in mind:
- A squeeze can resolve in either direction.
- A strong-looking release can still fail.
- A failed release does not automatically imply a reversal trend.
- Different symbols and timeframes may require different threshold settings.
- Very noisy instruments may produce more frequent state changes.
Because of this, the script should be interpreted as a structured context layer rather than as a standalone execution model.
Open-source access does not remove the need for user judgment. Inputs still need to be reviewed and adjusted where appropriate for the instrument and timeframe being studied.
Risk Disclosure
This indicator is for chart analysis and educational use. It does not provide financial, investment, legal, or tax advice.
Any decision based on this script remains the responsibility of the user. Markets can behave unpredictably, and no indicator can eliminate risk. Users should evaluate signals, states, and visual conditions in the context of their own methodology, time horizon, and risk framework.
Pine Script® indicator






















