PROTECTED SOURCE SCRIPT

YBL – LITE HUD (Vol/Δ + Heatmap RVOL + Squeeze)

44
YBL – LITE HUD (Volume Δ + RVOL Heatmap + Squeeze) [Normalized + zVol Color] + ADV

YBL – LITE HUD is a multi-module volume & momentum dashboard that packs into a single panel:
• A fast Vol/Δ (up vs down volume) HUD
• A Volume Heatmap / RVOL engine with session max tracking
• A full Squeeze Momentum implementation
• Optional ADV metrics: Power vs reference symbol, Trend/Momentum, and Correlation
• Candle painting logic with priority Squeeze > Heatmap
• A compact HUD table summarizing everything in one place

It’s designed as a lightweight all-in-one volume/momentum panel for intraday and swing trading.



1️⃣ LITE: Vol/Δ (up vs down volume)
• Uses a rolling window of lookback bars.
• Sums up volume (bull candles) vs down volume (bear candles).
• Computes:
• totVol – total volume in the window
• dAcc – net volume delta (upVol – dnVol)
• HUD row shows:
• Net Δ with direction symbol: ▲ / ▼ / ▬
• Total volume in the lookback window
• Color of the row reflects the dominant side (green for buyers, red for sellers).



2️⃣ Heatmap / RVOL engine

Two modes:
• Heatmap (Percentiles)
• Uses percentiles over len bars (p1, p2, p3) to classify volume as:
• Low, Medium, High, Ultra
• RVOL (x Average)
• Relative volume = vol / SMA(vol, len)
• Thresholds:
• t1, t2, t3 → multi-level RVOL bands.

Extra features:
• Session max tracking
• Option to reset max volume per day/session (resetDay).
• Tracks the current session maximum volume.
• Can plot a line at the session max (showLineM).
• Heatmap colors
• Neutral, medium, high, ultra and special color for new session max.
• Optional candle painting by Heatmap/RVOL (paintC).



3️⃣ Squeeze Momentum module

Classic BB vs KC Squeeze plus momentum:
• Bollinger Bands:
• lenBB, multBB
• Keltner Channels:
• lenKC, multKC
• Squeeze states:
• Squeeze ON → BB inside KC
• Squeeze OFF → BB outside KC
(both can show dots at panel bottom)

Momentum:
• Base: momBase = src – SMA(src, lenBB)
• Smoothed with linreg over 20 bars.
• Column color:
• Green/Lime for positive momentum
• Orange/Red for negative momentum, depending on slope rising/falling

You can choose which panel to show via panelMode:
• Volume
• Squeeze
• Both



4️⃣ Normalization (Both panels + z-coloring)

When panelMode = "Ambos" and normalizeAmbos = true:
• Volume is plotted as zVol (z-score of volume).
• Momentum is also normalized to z-score.
• A single z-window (lenNorm) is used for both.

The Heatmap coloring can switch to zVol-based color bands:
• z1, z2, z3 define low/medium/high/ultra bands.
• Special color for current session max.

Title mode logic (titleMode) lets you force:
• “Normalized” titles
• “Original” titles
• Or automatic behavior based on the normalize setting.



5️⃣ ADV (optional “heavy” metrics)

When useADV = true, the script adds:
• POWER vs reference symbol (cmpSymbol, e.g. DXY):
• Uses ROC and z-score to compute a relative performance score: pScore = zA – zB.
• Color and arrow (↑ / ↓ / ▬) in the table.
• Trend & Momentum
• EMA fast/slow (emaLenFast, emaLenSlow) to define a trend regime (bullish vs bearish).
• RSI-based momentum (momLen), shifted around 50 to give a momentum bias.
• HUD row: TEND/MOM with text like “Bullish/Bearish | Mom value”.
• Correlation vs reference symbol
• ta.correlation(close, cmpClose, corrLen).
• Color-coded row:
• Green for positive correlation (directional).
• Red for strong inverse correlation.
• Gray for neutral.

These ADV rows turn the panel into a macro/relative-strength HUD on top of volume/squeeze.



6️⃣ Candle painting (priority logic)

Two color sources:
• Squeeze paint (paintBarsSqz)
• Colors candles based on momentum direction.
• Heatmap paint (paintC)
• Colors candles based on Heatmap/RVOL intensity.

paintMode controls priority:
• Auto: Squeeze > Heatmap → if Squeeze has a color, it wins; otherwise use Heatmap.
• Solo Squeeze → only Squeeze logic.
• Solo Heatmap → only Heatmap logic.



7️⃣ HUD table (top-right)

When showTable = true, a compact table shows:
1. VOL/Δ (LB N) – window size, net Δ and total volume.
2. RVOL (mode) – current RVOL and color-matched heatmap.
3. MAX sesión/global – shows if there is a new session max or the current max value.
4–6. (Optional) ADV rows when useADV is ON:
• POWER vs symbol
• TEND/MOM
• CORREL vs symbol

Everything updates on the last bar only for performance and clarity.



8️⃣ Alerts

Built-in alert:
• “YBL – Nuevo máximo de volumen (sesión)”
• Triggers whenever a new session volume max is printed.
• Perfect to catch volume climaxes intraday.



⚠️ Disclaimer
This script is for educational and analytical purposes only and does not constitute financial advice. Always do your own research and manage your risk.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.