BB Squeeze BreakoutBB Squeeze Breakout
Precision Breakout is a volatility compression and breakout indicator based on Bollinger Bands, Keltner Channels, momentum filters, volume confirmation, and ATR-based risk levels.
The goal of this tool is to help traders read when price is compressing, when volatility starts expanding again, and whether a breakout has enough confirmation to be considered stronger or weaker.
This indicator is not a trading system by itself. It is made to support chart reading and should be used together with market structure, support and resistance, liquidity zones, session context, and personal risk management.
────────────────────────────
MAIN IDEA
────────────────────────────
Markets often move through two phases:
1. Compression
Price contracts, Bollinger Bands become tighter, and the market prepares for a possible expansion.
2. Expansion
Price breaks outside the bands, volatility increases, and a directional move can start.
This script tracks those phases with:
- Bollinger Bands
- Keltner Channels
- Squeeze detection
- Bollinger Bandwidth
- %B position
- Candle quality
- RSI momentum
- Volume expansion
- OBV confirmation
- MFI confirmation
- A/D confirmation
- ADX trend strength
- MACD confirmation
- EMA trend filter
- ATR-based SL and TP levels
- A dashboard for quick reading
────────────────────────────
HOW THE SIGNALS WORK
────────────────────────────
A bullish breakout appears when price closes above the upper Bollinger Band for the required number of confirmation bars.
A bearish breakout appears when price closes below the lower Bollinger Band for the required number of confirmation bars.
The script then checks additional conditions such as candle body quality, momentum, volume, OBV slope, MACD behavior, ATR expansion, Bollinger Bandwidth expansion, and post-squeeze context.
The final signal depends on the confluence score and the selected filters.
A strong signal means that the breakout structure is present and the required confirmations are aligned.
A weak signal means that price broke outside the Bollinger Band, but the score or one of the active filters was not strong enough.
────────────────────────────
MINI TUTORIAL FOR BEGINNERS
────────────────────────────
1. Add the indicator to the chart.
2. Start with the default settings.
3. Look for a squeeze phase, where Bollinger Bands compress inside the Keltner Channel.
4. Wait for a squeeze release or a confirmed breakout outside the Bollinger Bands.
5. Check the dashboard:
- Squeeze: shows if compression is active.
- Post-SQ: shows if the market recently left a squeeze.
- BandWidth: shows if volatility is low or expanding.
- %B: shows where price is inside or outside the bands.
- SNIPER: shows the current confluence score.
- Signal: shows BUY, SELL, WEAK BUY, WEAK SELL, or WAIT.
6. If a signal appears, check if it agrees with the trend, support/resistance, and market structure.
7. Use the ATR-based Entry, SL, TP1, TP2, and TP3 levels as visual planning references.
8. Do not take a signal blindly. Always check the context before making a decision.
────────────────────────────
EXAMPLE CASES
────────────────────────────
Example 1: Bullish post-squeeze breakout
Price has been moving sideways, the Bollinger Bands are tight, and the squeeze is active. Then price closes above the upper Bollinger Band with a strong candle, rising volume, improving RSI, and expanding bandwidth. The dashboard shows a bullish score above the minimum threshold. A BUY label can appear, and the ATR risk levels show Entry, SL, TP1, TP2, and TP3.
Example 2: Bearish breakdown
Price loses support and closes below the lower Bollinger Band. RSI moves below 50, OBV weakens, MACD confirms downside pressure, and the candle closes near the low of its range. If the score and active filters agree, a SELL label can appear.
Example 3: Weak breakout
Price closes outside the Bollinger Band, but the candle is small, volume is not expanding, or momentum is weak. In this case, the script can show a WEAK signal instead of a confirmed one. This means the structure exists, but confirmation is not strong enough.
Example 4: Head fake
Price briefly breaks outside a band, then moves back inside the Bollinger structure. The script can mark this as a possible head fake. This helps identify failed breakouts, especially in choppy or low-volume markets.
Example 5: Band walk
During strong trends, price can continue moving along the upper or lower Bollinger Band. The script marks these band walk conditions to show possible trend continuation behavior.
────────────────────────────
INPUTS EXPLAINED
────────────────────────────
BOLLINGER BANDS
BB Length
Controls the moving average period used for the Bollinger Band basis. The default value is 20, which is the classic Bollinger setting.
BB StdDev
Controls the standard deviation multiplier used to build the upper and lower bands. The default value is 2.0, which is the common standard setting.
Neon Glow
Adds a visual glow effect around the Bollinger Bands.
Heat Zone
Colors the area between the Bollinger Bands depending on price position inside the band range.
────────────────────────────
KELTNER / SQUEEZE
Keltner Length
Controls the length used for the Keltner Channel calculation.
Keltner Mult
Controls the ATR multiplier used to build the Keltner Channel.
Show Keltner
Shows or hides the Keltner Channel on the chart.
Post-Squeeze Window
Defines how many bars after a squeeze release are still considered part of the post-squeeze phase.
Squeeze Ready Lookback
Looks back over a selected number of bars to detect when Bollinger Bandwidth is near a low-compression zone.
Show Squeeze Dots
Shows dots during squeeze conditions and squeeze release events.
────────────────────────────
BREAKOUT SIGNALS
Confirmation Bars
Defines how many consecutive closes outside the Bollinger Band are required before confirming a breakout.
Show BUY/SELL Labels
Shows or hides the main BUY and SELL labels.
Show Arrows
Shows or hides the arrow markers on the chart.
Show Tiny Info Labels
Shows or hides smaller labels such as weak signals and head fake warnings.
Head Fake Lookback
Controls how many bars are checked to detect a failed breakout after price moved outside a band.
Band Walk Bars
Controls how many bars are required to detect a band walk condition.
────────────────────────────
SNIPER ENGINE
Min Confluence Score
Sets the minimum score required for a confirmed signal. A higher value gives fewer signals but requires stronger confirmation.
Min Body/Range Ratio
Defines how large the candle body must be compared to the full candle range. This helps filter weak candles and dojis.
Close Must Be In Top/Bot %
For bullish candles, the close should be near the top of the range. For bearish candles, the close should be near the bottom of the range.
ATR Expansion Factor
Checks if current ATR is expanding compared to its average. This helps confirm volatility expansion.
Require Momentum Acceleration
Uses momentum behavior, mainly RSI acceleration, as part of the confirmation logic.
Require Volume Expansion
Uses volume expansion as part of the breakout quality reading.
Require BB Width Expansion
Checks if Bollinger Bandwidth is expanding during the breakout.
Anti-Wick Rejection Filter
Helps reject breakouts when the previous candle shows a strong wick against the breakout direction.
────────────────────────────
FILTERS
Use RSI Filter
Activates or disables RSI confirmation.
RSI Length
Controls the RSI calculation period.
Use OBV Filter
Activates or disables OBV confirmation.
Use Volume Spike Filter
Activates or disables volume spike confirmation.
Volume MA Length
Controls the moving average length used to compare current volume.
Volume Min x MA
Defines how much current volume must exceed the volume average.
Use MFI Filter
Activates or disables Money Flow Index confirmation.
MFI Length
Controls the MFI calculation period.
Use A/D Filter
Activates or disables Accumulation/Distribution confirmation.
Use ADX Filter
Activates or disables ADX trend strength confirmation.
ADX Length
Controls the ADX calculation period.
ADX Min
Defines the minimum ADX value required when the ADX filter is active.
Use MACD Filter
Activates or disables MACD confirmation.
Use EMA Trend Filter
Activates or disables EMA trend confirmation.
EMA Fast
Controls the fast EMA length.
EMA Slow
Controls the slow EMA length.
────────────────────────────
RISK MANAGEMENT
Show SL / TP
Shows or hides Entry, Stop Loss, and Take Profit levels.
Show SL/TP Zones
Shows or hides the colored risk and target zones.
Show SL/TP Labels
Shows or hides the Entry, SL, TP1, TP2, and TP3 labels.
SL ATR x
Controls the ATR multiplier used to calculate the Stop Loss distance.
TP1 ATR x
Controls the ATR multiplier used to calculate the first Take Profit level.
TP2 ATR x
Controls the ATR multiplier used to calculate the second Take Profit level.
TP3 ATR x
Controls the ATR multiplier used to calculate the third Take Profit level.
Enable TP3
Shows or hides the third Take Profit level.
RM Label Offset Bars
Moves the risk management labels slightly to the right of the current price area. The labels and zones update automatically as new candles appear.
────────────────────────────
DASHBOARD
Show Dashboard
Shows or hides the dashboard panel.
Position
Moves the dashboard to the selected chart corner.
High Contrast Panel
Makes the dashboard easier to read with stronger background contrast.
────────────────────────────
VISUAL ELEMENTS
────────────────────────────
The indicator can display:
- Bollinger Bands
- Bollinger glow effect
- Heat zone between bands
- Keltner Channels
- Squeeze dots
- Squeeze release dots
- BUY and SELL labels
- Weak breakout labels
- Head fake labels
- Band walk markers
- ATR-based Entry, SL, TP1, TP2, TP3 levels
- Colored risk and target zones
- A dashboard with market state information
────────────────────────────
IMPORTANT NOTES
────────────────────────────
This script is an indicator, not a strategy.
It does not place trades.
It does not guarantee profitable results.
It does not predict the future.
Signals can fail in ranging, low-liquidity, high-spread, or news-driven market conditions.
Users should test the indicator on their own symbols, timeframes, and trading style before using it in live market decisions.
Risk management remains the responsibility of the user.
Pine Script®指标






















