PROTECTED SOURCE SCRIPT
YBL_LUXE — Squeeze Momentum (Overlay + Divergences + Liquidity

YBL_LUXE — Squeeze Momentum (Overlay + Div + Liquidity + EMA Reversals)
This is an overlay version of a Squeeze Momentum framework that combines 4 powerful concepts on top of price:
• BB vs KC “squeeze” condition
• Momentum-based bar coloring
• Price/Momentum divergences
• Liquidity grabs (sweeps of HH/LL)
• EMA-based reversal logic (engulfing + momentum flips)
All in a single YBL_LUXE tool that sits directly on your candles (overlay).
────────────────────────
🎛 1. Squeeze Logic (BB vs KC)
────────────────────────
The classic squeeze engine:
• Bollinger Bands:
– BB Length
– BB Mult
• Keltner Channels:
– KC Length
– KC Mult
The script computes:
• Squeeze ON → BB is inside KC (compression).
• Squeeze OFF → BB is outside KC (expansion).
Optionally:
• You can display squeeze ON/OFF dots below candles:
– Gray dot = squeeze ON.
– Yellow dot = squeeze OFF.
This lets you see where volatility is compressed and where it’s expanding.
────────────────────────
📈 2. Momentum & Bar Coloring
────────────────────────
Momentum is built as:
1. momBase = price – SMA(price, BB length)
2. mom = linear regression of momBase over 20 bars.
Momentum conditions:
• momUp = mom ≥ 0
• momRising = mom > mom[1]
Bar color logic:
• Strong bullish / rising momentum → bright lime/green tone.
• Bearish / falling momentum → red/orange tone.
If “Paint bars” is enabled:
• Candles are recolored according to momentum bias.
• Later, special events (divs, liquidity, reversals) override this base color with higher priority.
Priority of colors:
1. Reversal
2. Liquidity sweep
3. Divergence
4. Basic momentum
────────────────────────
🔍 3. Divergences (Price vs Momentum)
────────────────────────
The script detects classic divergences using pivots:
• Price pivots:
– PH (pivot high)
– PL (pivot low)
• Momentum pivots:
– PMH (pivot high on momentum)
– PML (pivot low on momentum)
You can control:
• Pivot sensitivity (left/right bars).
• Synchronization tolerance between price and momentum pivots (bars apart).
Bearish divergence:
• Price makes a higher high (current PH > previous PH)
• Momentum makes a lower high (current PMH < previous PMH).
Bullish divergence:
• Price makes a lower low
• Momentum makes a higher low.
Visuals:
• Bar colors for divergence (aqua / purple).
• Optional labels:
– “Div+” for bullish divergence.
– “Div-” for bearish divergence.
If enabled:
• Lines from previous pivot to current pivot (PH→PH, PL→PL) are drawn:
– Style (solid/dotted/dashed) and width are configurable.
────────────────────────
💧 4. Liquidity Grabs (Sweeps of HH/LL)
────────────────────────
The script scans a lookback window for:
• Previous highest high (prevHH).
• Previous lowest low (prevLL).
Then checks:
• Sweep of highs:
– Current high > prevHH.
– And optional “rejection” condition:
– If “Wick only” is ON → close back below prevHH.
– Else → close below the high.
• Sweep of lows:
– Current low < prevLL.
– And optional “wick only” logic mirrored.
Visuals:
• Special bar colors for sweeps (yellow for highs, blue for lows).
• Optional labels:
– “Liq+” = liquidity taken below (bullish context).
– “Liq-” = liquidity taken above (bearish context).
Alerts:
• “Liquidity Grab (High)”
• “Liquidity Grab (Low)”
────────────────────────
🔁 5. EMA-Based Reversals (Engulfing + Momentum Flip)
────────────────────────
Reversal logic combines:
1. Engulfing pattern:
• Bullish engulf:
– Strong bull candle engulfing prior bear candle body.
• Bearish engulf:
– Strong bear candle engulfing prior bull candle body.
2. Momentum flip:
• Bull flip → momentum crosses above 0.
• Bear flip → momentum crosses below 0.
3. Liquidity sweep gate (optional):
• You can require a recent sweep:
– For bullish reversal → recent sweep of lows.
– For bearish reversal → recent sweep of highs.
• Controlled by:
– “Need sweep” toggle.
– “Sweep lookback” window.
4. EMA confirmation:
• EMA confirmation (enable/disable).
• EMA length.
• Optional EMA slope filter:
– For bulls: EMA rising above a minimum slope.
– For bears: EMA falling below a negative minimum slope.
Final reversal conditions:
• Bullish Rev:
– (Engulfing or momentum flip)
– AND sweep gate (if enabled)
– AND EMA gate (if enabled).
• Bearish Rev:
– Mirror logic for the opposite side.
Visuals:
• Distinct bar colors for bullish vs bearish reversals.
• Optional labels:
– “Rev+” for bullish reversals.
– “Rev-” for bearish reversals.
Alerts:
• “Reversal Alcista (EMA)”
• “Reversal Bajista (EMA)”
────────────────────────
⚙️ Style & UX Options
────────────────────────
• Paint bars by momentum (ON/OFF).
• Show arrows/labels on candles (Div/Liq/Rev).
• Only last label per type (keeps chart clean).
• Show squeeze dots ON/OFF.
• Custom colors for each event type:
– Divergences (bull/bear).
– Liquidity sweeps (high/low).
– Reversals (bull/bear).
────────────────────────
📍 Suggested Usage
────────────────────────
This script is best used as:
• An overlay decision-support tool, not an auto-entry system.
• A way to cluster multiple confluences:
– Squeeze → context of volatility regime.
– Momentum color → directional bias.
– Divergences → exhaustion/counter-move potential.
– Liquidity sweeps → stop-hunt zones.
– EMA-based reversals → structured re-entry confirmation.
Works well on:
• Index futures, forex majors, crypto pairs.
• 5m / 15m / 1H charts depending on your style (scalping or intraday swing).
────────────────────────
⚠️ Disclaimer
────────────────────────
This script is for educational and research purposes only and does not constitute financial advice. Trading involves substantial risk and is not suitable for every investor. Always test your ideas and use proper risk management before trading live.
────────────────────────
© YBL / Yuriel — YBL_LUXE Squeeze Momentum Overlay
────────────────────────
This is an overlay version of a Squeeze Momentum framework that combines 4 powerful concepts on top of price:
• BB vs KC “squeeze” condition
• Momentum-based bar coloring
• Price/Momentum divergences
• Liquidity grabs (sweeps of HH/LL)
• EMA-based reversal logic (engulfing + momentum flips)
All in a single YBL_LUXE tool that sits directly on your candles (overlay).
────────────────────────
🎛 1. Squeeze Logic (BB vs KC)
────────────────────────
The classic squeeze engine:
• Bollinger Bands:
– BB Length
– BB Mult
• Keltner Channels:
– KC Length
– KC Mult
The script computes:
• Squeeze ON → BB is inside KC (compression).
• Squeeze OFF → BB is outside KC (expansion).
Optionally:
• You can display squeeze ON/OFF dots below candles:
– Gray dot = squeeze ON.
– Yellow dot = squeeze OFF.
This lets you see where volatility is compressed and where it’s expanding.
────────────────────────
📈 2. Momentum & Bar Coloring
────────────────────────
Momentum is built as:
1. momBase = price – SMA(price, BB length)
2. mom = linear regression of momBase over 20 bars.
Momentum conditions:
• momUp = mom ≥ 0
• momRising = mom > mom[1]
Bar color logic:
• Strong bullish / rising momentum → bright lime/green tone.
• Bearish / falling momentum → red/orange tone.
If “Paint bars” is enabled:
• Candles are recolored according to momentum bias.
• Later, special events (divs, liquidity, reversals) override this base color with higher priority.
Priority of colors:
1. Reversal
2. Liquidity sweep
3. Divergence
4. Basic momentum
────────────────────────
🔍 3. Divergences (Price vs Momentum)
────────────────────────
The script detects classic divergences using pivots:
• Price pivots:
– PH (pivot high)
– PL (pivot low)
• Momentum pivots:
– PMH (pivot high on momentum)
– PML (pivot low on momentum)
You can control:
• Pivot sensitivity (left/right bars).
• Synchronization tolerance between price and momentum pivots (bars apart).
Bearish divergence:
• Price makes a higher high (current PH > previous PH)
• Momentum makes a lower high (current PMH < previous PMH).
Bullish divergence:
• Price makes a lower low
• Momentum makes a higher low.
Visuals:
• Bar colors for divergence (aqua / purple).
• Optional labels:
– “Div+” for bullish divergence.
– “Div-” for bearish divergence.
If enabled:
• Lines from previous pivot to current pivot (PH→PH, PL→PL) are drawn:
– Style (solid/dotted/dashed) and width are configurable.
────────────────────────
💧 4. Liquidity Grabs (Sweeps of HH/LL)
────────────────────────
The script scans a lookback window for:
• Previous highest high (prevHH).
• Previous lowest low (prevLL).
Then checks:
• Sweep of highs:
– Current high > prevHH.
– And optional “rejection” condition:
– If “Wick only” is ON → close back below prevHH.
– Else → close below the high.
• Sweep of lows:
– Current low < prevLL.
– And optional “wick only” logic mirrored.
Visuals:
• Special bar colors for sweeps (yellow for highs, blue for lows).
• Optional labels:
– “Liq+” = liquidity taken below (bullish context).
– “Liq-” = liquidity taken above (bearish context).
Alerts:
• “Liquidity Grab (High)”
• “Liquidity Grab (Low)”
────────────────────────
🔁 5. EMA-Based Reversals (Engulfing + Momentum Flip)
────────────────────────
Reversal logic combines:
1. Engulfing pattern:
• Bullish engulf:
– Strong bull candle engulfing prior bear candle body.
• Bearish engulf:
– Strong bear candle engulfing prior bull candle body.
2. Momentum flip:
• Bull flip → momentum crosses above 0.
• Bear flip → momentum crosses below 0.
3. Liquidity sweep gate (optional):
• You can require a recent sweep:
– For bullish reversal → recent sweep of lows.
– For bearish reversal → recent sweep of highs.
• Controlled by:
– “Need sweep” toggle.
– “Sweep lookback” window.
4. EMA confirmation:
• EMA confirmation (enable/disable).
• EMA length.
• Optional EMA slope filter:
– For bulls: EMA rising above a minimum slope.
– For bears: EMA falling below a negative minimum slope.
Final reversal conditions:
• Bullish Rev:
– (Engulfing or momentum flip)
– AND sweep gate (if enabled)
– AND EMA gate (if enabled).
• Bearish Rev:
– Mirror logic for the opposite side.
Visuals:
• Distinct bar colors for bullish vs bearish reversals.
• Optional labels:
– “Rev+” for bullish reversals.
– “Rev-” for bearish reversals.
Alerts:
• “Reversal Alcista (EMA)”
• “Reversal Bajista (EMA)”
────────────────────────
⚙️ Style & UX Options
────────────────────────
• Paint bars by momentum (ON/OFF).
• Show arrows/labels on candles (Div/Liq/Rev).
• Only last label per type (keeps chart clean).
• Show squeeze dots ON/OFF.
• Custom colors for each event type:
– Divergences (bull/bear).
– Liquidity sweeps (high/low).
– Reversals (bull/bear).
────────────────────────
📍 Suggested Usage
────────────────────────
This script is best used as:
• An overlay decision-support tool, not an auto-entry system.
• A way to cluster multiple confluences:
– Squeeze → context of volatility regime.
– Momentum color → directional bias.
– Divergences → exhaustion/counter-move potential.
– Liquidity sweeps → stop-hunt zones.
– EMA-based reversals → structured re-entry confirmation.
Works well on:
• Index futures, forex majors, crypto pairs.
• 5m / 15m / 1H charts depending on your style (scalping or intraday swing).
────────────────────────
⚠️ Disclaimer
────────────────────────
This script is for educational and research purposes only and does not constitute financial advice. Trading involves substantial risk and is not suitable for every investor. Always test your ideas and use proper risk management before trading live.
────────────────────────
© YBL / Yuriel — YBL_LUXE Squeeze Momentum Overlay
────────────────────────
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarle liberamente e senza alcuna limitazione – ulteriori informazioni qui.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarle liberamente e senza alcuna limitazione – ulteriori informazioni qui.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.