OPEN-SOURCE SCRIPT
Squeeze Breakout Pro

🔥 What This Script Does
This is a Breakout Strength Scanner with Squeeze + Pattern Range + Volume Confirmation + Risk Management + Take Profits.
✅ Core Functions:
Squeeze Detector:
Finds low volatility zones using Bollinger Band width compression.
Marks them with a “Squeeze” label — this signals that a big move is likely coming soon.
Pattern Range Detection:
Automatically identifies recent pivot highs (resistance) and pivot lows (support) using the pivotLen.
Draws the current consolidation range visually with horizontal lines.
Breakout Confirmation:
Requires:
✅ A break above resistance or below support.
✅ Confirmed with above-average volume.
✅ Must occur while in a volatility squeeze.
Plots arrows:
🔼 Green Up Arrow = Confirmed Bullish Breakout.
🔽 Red Down Arrow = Confirmed Bearish Breakout.
Trade Management Built-In:
Stop Loss: Just beyond the opposite side of the pattern range.
Take Profits:
✅ TP1 = 1.5x risk.
✅ TP2 = 2x risk.
Position Size Calculator:
Based on your input account size (accountBal) and risk percentage (riskPct).
Shows how many contracts, shares, or units to buy/sell to risk exactly that % of your account.
Higher Timeframe Trend Filter:
Default is 4-hour trend filter (can be changed).
✅ Only shows if the higher timeframe trend is Bullish (EMA50 > EMA200) or Bearish.
Displayed on the dashboard.
📊 How to Use It Step-By-Step
🟧 1. Look for a Squeeze:
A “Squeeze” label will appear.
This means price is coiled tight — a breakout is likely.
🟩 2. Wait for a Breakout Arrow:
🔼 Green Arrow: Bullish breakout (price breaks resistance + volume confirms + squeeze active).
🔽 Red Arrow: Bearish breakout (price breaks support + volume confirms + squeeze active).
🟥 3. Check the Dashboard:
✅ Trend Bias: Should ideally match your breakout.
If the higher timeframe is Bullish, long breakouts have better odds.
If Bearish, short breakouts are higher probability.
✅ Vol Confirm: Will say “Yes” if the volume condition is met.
🏹 4. Manage the Trade (Auto Levels):
The script draws:
🔴 Stop Loss Line (below range for longs, above for shorts).
🟢 Take Profit 1 (1.5x risk).
🟢 Take Profit 2 (2x risk).
Use these as guidelines for exits.
💰 5. Use Position Size Display:
Check the TP and SL distances and the suggested position size based on your account balance and risk percentage.
🚀 Pro Tips for Maximum Success
✅ Use Trend Confluence:
Only trade long breakouts when the higher timeframe trend is Bullish (EMA50 > EMA200).
Only trade short breakouts when the higher timeframe trend is Bearish.
✅ Avoid Fakeouts:
If a breakout arrow forms but the candle closes far away from the pattern breakout — wait for a retest or confirmation.
Higher volume + clean breakout works better than low-volume squeezes.
✅ Best Timeframes:
4H to Daily: For swing trades.
15m to 1H: For intraday trades (adjust htf to "240" for 4H trend confirmation even on lower charts).
✅ Increase Win Rate:
Use this script with key support/resistance zones, weekly ranges, or fib retracements.
Breakouts that happen near macro key levels have the highest follow-through.
✅ Set Alerts:
Right-click the breakout arrow or use alertcondition() events in the script.
Set alerts for:
📈 Breakout UP
📉 Breakout DOWN
🏹 Squeeze Active (prep for breakout)
✅ Walk Away Once In:
Let TP1 or TP2 hit.
Or move stop to breakeven after TP1 hits for free runners.
🔥 What Makes This Script Powerful:
Combines price action (pattern range) + volatility squeeze + volume confirmation + trend bias + risk management.
Most traders use these individually. This does it all in one clean tool.
💎 Professional Edge:
This is the type of script that turns reactive trading into systematic trading. No guessing. Clean rules. Repeatable.
This is a Breakout Strength Scanner with Squeeze + Pattern Range + Volume Confirmation + Risk Management + Take Profits.
✅ Core Functions:
Squeeze Detector:
Finds low volatility zones using Bollinger Band width compression.
Marks them with a “Squeeze” label — this signals that a big move is likely coming soon.
Pattern Range Detection:
Automatically identifies recent pivot highs (resistance) and pivot lows (support) using the pivotLen.
Draws the current consolidation range visually with horizontal lines.
Breakout Confirmation:
Requires:
✅ A break above resistance or below support.
✅ Confirmed with above-average volume.
✅ Must occur while in a volatility squeeze.
Plots arrows:
🔼 Green Up Arrow = Confirmed Bullish Breakout.
🔽 Red Down Arrow = Confirmed Bearish Breakout.
Trade Management Built-In:
Stop Loss: Just beyond the opposite side of the pattern range.
Take Profits:
✅ TP1 = 1.5x risk.
✅ TP2 = 2x risk.
Position Size Calculator:
Based on your input account size (accountBal) and risk percentage (riskPct).
Shows how many contracts, shares, or units to buy/sell to risk exactly that % of your account.
Higher Timeframe Trend Filter:
Default is 4-hour trend filter (can be changed).
✅ Only shows if the higher timeframe trend is Bullish (EMA50 > EMA200) or Bearish.
Displayed on the dashboard.
📊 How to Use It Step-By-Step
🟧 1. Look for a Squeeze:
A “Squeeze” label will appear.
This means price is coiled tight — a breakout is likely.
🟩 2. Wait for a Breakout Arrow:
🔼 Green Arrow: Bullish breakout (price breaks resistance + volume confirms + squeeze active).
🔽 Red Arrow: Bearish breakout (price breaks support + volume confirms + squeeze active).
🟥 3. Check the Dashboard:
✅ Trend Bias: Should ideally match your breakout.
If the higher timeframe is Bullish, long breakouts have better odds.
If Bearish, short breakouts are higher probability.
✅ Vol Confirm: Will say “Yes” if the volume condition is met.
🏹 4. Manage the Trade (Auto Levels):
The script draws:
🔴 Stop Loss Line (below range for longs, above for shorts).
🟢 Take Profit 1 (1.5x risk).
🟢 Take Profit 2 (2x risk).
Use these as guidelines for exits.
💰 5. Use Position Size Display:
Check the TP and SL distances and the suggested position size based on your account balance and risk percentage.
🚀 Pro Tips for Maximum Success
✅ Use Trend Confluence:
Only trade long breakouts when the higher timeframe trend is Bullish (EMA50 > EMA200).
Only trade short breakouts when the higher timeframe trend is Bearish.
✅ Avoid Fakeouts:
If a breakout arrow forms but the candle closes far away from the pattern breakout — wait for a retest or confirmation.
Higher volume + clean breakout works better than low-volume squeezes.
✅ Best Timeframes:
4H to Daily: For swing trades.
15m to 1H: For intraday trades (adjust htf to "240" for 4H trend confirmation even on lower charts).
✅ Increase Win Rate:
Use this script with key support/resistance zones, weekly ranges, or fib retracements.
Breakouts that happen near macro key levels have the highest follow-through.
✅ Set Alerts:
Right-click the breakout arrow or use alertcondition() events in the script.
Set alerts for:
📈 Breakout UP
📉 Breakout DOWN
🏹 Squeeze Active (prep for breakout)
✅ Walk Away Once In:
Let TP1 or TP2 hit.
Or move stop to breakeven after TP1 hits for free runners.
🔥 What Makes This Script Powerful:
Combines price action (pattern range) + volatility squeeze + volume confirmation + trend bias + risk management.
Most traders use these individually. This does it all in one clean tool.
💎 Professional Edge:
This is the type of script that turns reactive trading into systematic trading. No guessing. Clean rules. Repeatable.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.