OPEN-SOURCE SCRIPT

Smart Multi-Period [SVT]

501
🔷 VWAP CONFLUENCE ENGINE — Smart Multi-Period

An institutional-grade VWAP indicator designed around one core
idea: confluences between multiple timeframe Value Areas are the
highest-probability levels in the market.

⚙️ HOW IT WORKS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The indicator automatically selects the two most relevant VWAP
periods for your current timeframe:

📊 12H / Daily / Weekly → Annual VWAP
📊 4H / 8H → Quarterly VWAP
📊 1H / 2H → Monthly VWAP
📊 15M → Weekly VWAP
📊 5M / 3M / 1M → Session VWAP

No configuration needed. Just add it and trade.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔥 CONFLUENCE ENGINE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Automatically detects when DVAH, VWAP or DVAL levels from
different periods align within a configurable threshold.
Confluence zones are highlighted with dynamic boxes — the
stronger the confluence, the more visible the zone.

When price enters a confluence zone, the chart background
changes color as a real-time visual cue.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 MATURITY RULES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

A VWAP with only 1-2 bars of data is statistically unreliable.
This indicator only displays a VWAP once it has accumulated
enough volume to be meaningful:

• Weekly → from Tuesday (2nd trading day)
• Monthly → from Day 10
• Quarterly→ from the 2nd month of the quarter
• Annual → from Q2 (April)

Historical periods are always displayed in full.
Only the current active period applies the maturity rule.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 DASHBOARD
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Real-time panel showing all active levels with:
▲ / ▼ Price position relative to each level
📍 Exact price of each level
% Distance from current price
⚡ Confluence indicator per level
◀ Nearest level to current price
✓ IVA / ↑↓ OVA Value Area status
⏳ Maturity countdown for active periods

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚨 ALERTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Built-in alerts for:
• Price crosses VWAP / DVAH / DVAL (both periods)
• Price enters a Confluence Zone

Compatible with TradingView's alert manager via alertcondition().

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ KEY FEATURES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✅ Auto-Adaptive period selection
✅ Manual period override
✅ ATR-based confluence zone sizing
✅ IVA / OVA Value Area status
✅ Previous period zones (PDVAH / PDVAL / PDVWAP)
✅ Real-time level labels with price values
✅ Line width by period importance
✅ Fully customizable colors per period
✅ Works on all markets and timeframes

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📖 HOW TO READ IT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

• VWAP line: green = price above, red = price below
• DVA fill: the area between DVAH and DVAL (Value Area)
• ⚡ in dashboard: this level has a confluence
• Yellow box on chart: active confluence zone
• Yellow background: price currently inside confluence zone
• IVA ✓: price is inside the Value Area (balanced market)
• OVA ↑/↓: price is outside the Value Area (trending)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Based on the original VWAP Salvatierra framework.
Built for traders who use VWAP as a primary tool.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน