VDUB Bands - MTF WMA+ATR Volatility Lanes (6 Alerts)VDUB Bands draws volatility-scaled โtrend lanesโ around a Weighted Moving Average (WMA) using ATR (or a WMA of True Range). It can display up to four tiers (L1โL4), with higher tiers sourced from higher timeframes to show local structure โ higher-timeframe structure on a single chart.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
1. What it does (plain English)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Think of each tier as a lane system around the trend:
โข Inner rails = โnormal volatility laneโ around the WMA
โข Outer rails = โextension / extreme zoneโ for that tier
โข Higher tiers (L3/L4) show bigger structure
โข Lower tiers (L1/L2) show active lane behavior
Typical interpretation:
โข Price inside inner rails โ normal variance around the trend lane
โข Between inner and outer โ stretched, but not extreme
โข Outside outer rails โ extended vs that tierโs volatility band
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
2) Why itโs useful (and why itโs not a mashup)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
This is not a bundle of unrelated indicators. Everything serves one cohesive purpose:
โข Visualize trend + volatility lanes across multiple time horizons
โข Keep rails consistent and readable (levels, fills, outlines)
โข Optional multi-timeframe aggregation for structure context
โข A compact 6-alert set to catch key transitions without alert spam
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
3) What you see on the chart
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
For each level (L1โL4), you can show:
โข Upper/Lower Inner rails
โข Upper/Lower Outer rails
โข Optional center fill (between outer rails) = operating range
โข Optional MA line per tier (off by default to reduce clutter)
โข Base WMA line (L1 MA) if enabled
Suggested workflow:
โข Start with L1 + L2 only
โข Add L3/L4 once you like the structure view
โข Use Dynamic Opacity if the chart feels crowded
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
4) How it works (transparent formula)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
For each tier:
โข MA = WMA(source, baseLen ร levelMultiplier)
โข ATR_like = Wilder ATR (default)
OR WMA(TrueRange, atrLen ร levelMultiplier)
Inner rails:
โข upperInner = MA + ATR_like ร innerMult
โข lowerInner = MA - ATR_like ร innerMult
Outer rails:
โข upperOuter = MA + ATR_like ร outerMult
โข lowerOuter = MA - ATR_like ร outerMult
Tier behavior:
โข L1 uses the chart timeframe
โข L2โL4 can use user-selected HTFs (defaults: 4H / D / W)
or optional auto-selection
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
5) Multi-timeframe behavior + interpolation
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โข L2โL4 use request.security() with lookahead OFF (no future data).
โข HTF bands naturally โstepโ when the HTF candle confirms.
โข Interpolate HTF Bands (optional): visually blends from the prior confirmed HTF value to the current confirmed HTF value to reduce stepping. This is display smoothing, not prediction.
Repaint note:
โข If Live Interp (Repaints) is enabled, the HTF lines can update intrabar and may repaint. Keep it OFF for strict non-repainting behavior.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
6) Auto-select L2/L3/L4 (optional)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Two modes:
A) Ladder (deterministic)
โข Picks โbiggerโ timeframes relative to the chart (simple and fast).
B) Score (data-driven)
โข Tests candidate timeframes and scores them using:
โข Coverage: % of closes inside the OUTER band over Score Lookback
โข Width: average outer-band width as a fraction of MA
โข Targets: Target Coverage + Target Width
โข Weights: Coverage Weight + Width Weight
Performance notes:
โข Score mode is heavier (many candidates).
โข โLock auto-select after first pickโ is recommended to reduce load and avoid platform limits.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
7) Alerts (6 total, aggregated across L1โL4)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Alerts trigger if ANY tier meets the condition:
โข Cross ABOVE an OUTER band
โข Cross BELOW an OUTER band
โข Cross ABOVE an INNER band
โข Cross BELOW an INNER band
โข Price is OUTSIDE ABOVE an OUTER band
โข Price is OUTSIDE BELOW an OUTER band
These are intentionally aggregated to keep the alert count small while catching meaningful transitions.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
8) Limitations & transparency
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โข Indicator only (not a strategy). No performance claims.
โข MTF values update when the higher timeframe candle confirms.
โข Interpolation is visual smoothing; it does not forecast.
โข Non-standard chart types (Heikin Ashi/Renko/etc) may behave differently from standard candles.
โข If you enable repainting options, signals/levels may change intrabar.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
9) Credits/reuse disclosure
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โข Conceptual inspiration: VDUB and the community โVDUB_BINARY_PRO_3_V2โ idea of WMA ยฑ TR/ATR ร multipliers.
โข This version is a reimplementation + extension, adding:
o Multi-tier architecture (L1โL4)
o Higher-timeframe sourcing + optional interpolation
o Optional scoring-based timeframe selection
o Dynamic opacity + streamlined plotting
o Aggregated 6-alert set
No code was copied directly from the older script; this is a rewritten implementation with additional features and different structure.
www.tradingview.com
Penunjuk Pine Scriptยฎ






















