PROTECTED SOURCE SCRIPT

BandBreak Pro (BB×ST×SRC) — Live-Sync Indicator

49
📌 Overview

BandBreak Pro is a volatility + trend confirmation indicator designed to provide traders with clean breakout signals.
It synchronizes Bollinger Bands (BB), a selectable SRC line (price source), and Super trend (ST) into one unified logic.
⚡ Signals only trigger when price breaks the Bollinger Bands and the Super trend confirms the same direction.

📖 Basics & Definitions

1. Bollinger Bands (BB)

Bollinger Bands measure volatility by building an envelope around price.

Middle line (Basis) = Simple Moving Average (SMA).

Upper Band = SMA + (Multiplier × Standard Deviation).

Lower Band = SMA – (Multiplier × Standard Deviation).
👉 Meaning: A break above the upper band often suggests bullish strength, while a break below the lower band suggests bearish momentum.

2. SRC Line (Source Line)

The SRC line is a chosen price input: close, hlc3, or ohlc4.
It acts as the backbone since both BB and ST derive from it.
Benefit: Ensures everything is perfectly synchronized and avoids repainting issues.

3. Super trend (ST)

Supertrend is an ATR (Average True Range) based trend filter.
If price is above the ST line → Uptrend (Green).
If price is below the ST line → Downtrend (Red).
👉 Meaning: ST is a simple yet powerful filter to confirm trend direction and reduce false breakouts.

📌 CONCEPTS (with Calculations)

Hybrid Sync (History vs Realtime)
History: All calculations use confirmed OHLC via request.security (no lookahead) → no repaint.
Realtime: (if ON) calculations follow live chart OHLC → what you see is what you get.
Strict No-Repaint: Forces realtime bar to also use confirmed OHLC values.

👉 Formula:

if strict = true → use confirmed OHLC only
else if realtime and followChart = true → use chart OHLC
else → use confirmed OHLC


SRC Line (Selected Source)
User can select close, hlc3 = (high+low+close)/3, or ohlc4 = (open+high+low+close)/4.

This SRC drives Bollinger Bands and Supertrend.
👉 Formula:
SRC = close | hlc3 | ohlc4 (user choice)


Bollinger Bands (BB Break Logic)
Basis:
Basis = SMA(SRC, Length)

Standard Deviation:
Dev = StDev(SRC, Length)

Bands:
Upper = Basis + (Multiplier × Dev)
Lower = Basis - (Multiplier × Dev)

Breakout Filter:
UpBB = Upper × (1 + Buffer%)
DnBB = Lower × (1 – Buffer%)

👉 Meaning: Breakouts only count when price crosses filtered bands.

Supertrend (Directional Filter)
True Range:
TR = max(High – Low, |High – PrevClose|, |Low – PrevClose|)

ATR:
ATR = RMA(TR, ST_Length)

Bands:
BasicUp = (High+Low)/2 + (ST_Factor × ATR)
BasicDn = (High+Low)/2 – (ST_Factor × ATR)

Final Line (flip logic):
If Close > PrevUp → Trend = UP → use Dn line
If Close < PrevDn → Trend = DOWN → use Up line

Signal Formation (Confirmed Bar Only)
Long Condition:
Long = crossover(SRC, UpBB) AND Supertrend = UP

Short Condition:
Short = crossunder(SRC, DnBB) AND Supertrend = DOWN
Validation: Signals trigger only on barstate.isconfirmed (bar close).

🛠️ FEATURES

Clean, synced plots: Bollinger Bands, Basis line, SRC line, Supertrend line.
Hybrid sync modes: live-follow or strict no-repaint.
Bollinger controls: length, multiplier, buffer %, show/hide.
Supertrend controls: enable, ATR length, factor, show/hide.
Signal labels: BB×ST ↑ and BB×ST ↓.
Alerts: Built-in LONG/SHORT ready to use.
Overlay = true; optimized for intraday with higher label capacity.

📊 HOW TO USE
Timeframes: 5m–1H intraday; 2H–1D for swing trades.
Markets: Crypto, Forex, Indices, Equities.

Workflow:
Keep chart clean with only BandBreak Pro.
Start BB = 20 length, 2.0 multiplier. Use buffer 0.25–0.75% in choppy pairs.
Keep Supertrend ON to reduce false signals. Lower factor = faster flips.
After breakout, manage trades using S/R or BB midline.
SL = opposite ST line, TP = midline or nearest support/resistance.

⚠️ LIMITATIONS

Ranging markets may produce whipsaws.
Strict mode = safest but slower signals.
Not a strategy → no backtesting/PnL.
Parameters must be tuned for volatile/illiquid assets.
Always use with risk management.

🔔 ALERTS

BB×ST LONG → SRC crosses above upper band + ST = UP.
BB×ST SHORT → SRC crosses below lower band + ST = DOWN.
👉 Recommended: “Once Per Bar Close”.

NOTES

Buffer % = micro filter, useful for high-volatility assets.
Higher ST factor = fewer flips, more trend fidelity.
Lower ST factor = faster flips, more frequent signals.


🌟 Why BandBreak Pro is Unique

✅ Both BB and ST are calculated from the same hybrid OHLC SRC source → perfectly aligned & repaint-free.
✅ Only issues dual-confirmation signals → fewer false breakouts.
✅ Beginner-friendly (clear definitions included) + Pro-level customization (buffer %, sync modes).
✅ Multi-market: Crypto, Forex, Indices, Stocks.

🙏 Thanks

Bollinger Bands = John Bollinger’s volatility framework.
Supertrend = ATR-based classic TA tool.
SRC + Hybrid Sync = original implementation adapted for TradingView.

ekran görüntüsüekran görüntüsüekran görüntüsüekran görüntüsü

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.