OPEN-SOURCE SCRIPT
Zaktualizowano AG Pro Bollinger Bands Squeeze Map [AGPro Series]

AG Pro Bollinger Bands Squeeze Map [AGPro Series]
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.
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.
Informacje o Wersji
Update Notes - V1.2This update focuses on visual refinement, panel standardization, and overall chart readability.
• Rebuilt the panel header into a single merged blue title row for a cleaner and more consistent AG Pro layout.
• Set the default panel font size to Small and the default label size to Normal.
• Improved panel contrast and row readability for a more balanced dark/light theme presentation.
• Reduced the visual intensity of building and neutral squeeze zones so price action remains easier to read.
• Softened the Bollinger Band, basis, and Keltner Channel line presentation to reduce chart clutter.
• Refined label spacing and forward placement for cleaner release, re-compression, and deep squeeze tagging.
• Tightened the overall overlay balance so the map remains informative without becoming visually heavy.
• Added final micro-polish adjustments to support a cleaner viewing experience across different symbols and timeframes.
This update is primarily focused on visual clarity, presentation quality, and interface consistency. The script remains an analytical chart tool designed for squeeze structure observation and release monitoring.
Informacje o Wersji
Update Notes - Version 2.0This update rebuilds the script around a stronger squeeze-to-launch workflow while keeping the original published script name intact. The goal was to make the chart cleaner, more informative, and more distinctive at first glance.
- Added a live setup pocket so building compression is visible before a full squeeze is confirmed.
- Added preserved launch boxes that keep the release zone visible after expansion.
- Added a tighter launch structure model with Launch, Hold, and Lost Launch behavior.
- Added Launch Rails so recent launch zones stand out with a clearer visual signature.
- Improved setup tracking with better context when the market is compressing but not yet fully squeezed.
- Reworked the panel so it stays useful outside active launch events and avoids stale context.
- Reduced label clutter and improved label spacing for a cleaner premium chart presentation.
- Added stronger visual fading on older launch zones so current structure remains the focus.
- Improved tooltip quality and standardized the panel layout with the AG Pro header row.
- Optimized the script for a cleaner public release with a more professional overlay workflow.
Informacje o Wersji
UPDATE NOTES - v2.5This update focuses on chart readability and visual structure.
The core purpose of the script remains unchanged.
This release improves how the existing logic is presented, organized, and interpreted on the chart.
This script continues to function as an analytical and visualization tool.
It does not attempt to predict price direction or provide guaranteed outcomes.
------------------------
What Changed
------------------------
- Density-bounded event labels
Event labels were rebuilt around a single placement scheduler. Up-side and
down-side labels each track the last placed label and stack new labels
vertically inside a cluster window by a clear ATR step. The stack depth per
side is capped, and once a cluster is full or a new label would sit too close
to the previous one, the extra label is suppressed. Labels no longer overlap
or truncate, and dense, choppy zones with many Launch, Hold and Lost events in
a short span now stay clean instead of piling up.
- Centered pocket badge
A single readout is now centered inside the forming setup pocket, both
horizontally and vertically, showing the setup stage and score (for example
Tight 91 or Building 71). It keeps the active compression zone informative at
a glance. After a confirmed launch, the launch box is marked by its own event
label and target tag, so no second badge is drawn over the launch zone.
- Measured-move target projection
A single dashed target line now projects from the latest confirmed launch,
using the squeeze pocket height (scaled by the Target Measured-Move Multiple
input) as a classic measured-move reference. One Target tag is anchored near
the right of the projection so it never overlaps the launch box. This is a
reference projection only, not a price prediction.
- Clearer launch box layering
Only the most recent launch box is rendered with a crisp border and fill.
Older preserved launch boxes fade strongly with age, so overlapping boxes no
longer create a muddy stack and the active zone stays the focal element.
- Adaptive label text color
Label and badge text color is now selected automatically from the background
brightness, keeping every readout legible across the full palette.
------------------------
Visual Improvements
------------------------
- Improved chart readability by removing label overlap and truncation through
vertical stacking and consistent above/below candle clearance.
- Reduced visual clutter by fading older launch boxes and keeping a single
centered zone badge and a single target tag on screen.
- Refined visual hierarchy so the active pocket, the launch zone, and the
target reference stand out more clearly at first glance.
- Adjusted positioning of labels and tags to keep them clear of candles and
clear of the zone they describe.
------------------------
Interface & Usability
------------------------
- Optimized on-chart information flow so the setup, the risk reference, and the
target read together without crowding.
- Improved label readability for cleaner chart interaction.
- Added three Zones controls: Show Centered Pocket Badge, Show Launch Target
Projection, and Target Measured-Move Multiple. All are on by default and can
be turned off.
- Simplified the Hold event label to a clean "Hold" marker, since the launch
grade and score are already shown by the launch label and in the panel.
- Enhanced overall user experience without changing core logic.
------------------------
Behavior Notes
------------------------
This update does not change the core analytical logic of the script.
The squeeze detection, launch grading, hold and lost tracking, and the
confirmation-anchored Launch Hold statistic all behave exactly as before.
The goal is to improve clarity and usability, not to introduce new predictive
behavior. Users should interpret outputs the same way as before, but with
improved visual structure.
------------------------
Limitations Reminder
------------------------
The script remains a rule-based analytical tool.
Market conditions such as volatility, liquidity, and timeframe differences may
affect how squeezes, launches, and the measured-move target appear.
The target projection is a geometric reference derived from the squeeze pocket
height. It is not a forecast and should always be interpreted within broader
market context.
------------------------
Risk Reminder
------------------------
This script is for educational and analytical purposes only.
It does not provide financial advice or guaranteed trading outcomes.
Users remain responsible for their own decisions.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
🧠 Trading Suite - Flagship Workflow
tradingview.com/script/XJmX3p98-Trading-Suite-AGPro-Series/
🔷 Crypto Setup Planner - Multi-Symbol Planner
tradingview.com/script/LgVRo7Ql-Crypto-Setup-Planner-AGPro-Series/
tradingview.com/script/XJmX3p98-Trading-Suite-AGPro-Series/
🔷 Crypto Setup Planner - Multi-Symbol Planner
tradingview.com/script/LgVRo7Ql-Crypto-Setup-Planner-AGPro-Series/
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
🧠 Trading Suite - Flagship Workflow
tradingview.com/script/XJmX3p98-Trading-Suite-AGPro-Series/
🔷 Crypto Setup Planner - Multi-Symbol Planner
tradingview.com/script/LgVRo7Ql-Crypto-Setup-Planner-AGPro-Series/
tradingview.com/script/XJmX3p98-Trading-Suite-AGPro-Series/
🔷 Crypto Setup Planner - Multi-Symbol Planner
tradingview.com/script/LgVRo7Ql-Crypto-Setup-Planner-AGPro-Series/
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.