OPEN-SOURCE SCRIPT

VWAP Regime Filter & Signal Quality Indicator [LunqFX]

9 664
VWAP Regime Filter & Signal Quality Indicator [LunqFX]

A complete trading framework built on volume-weighted flow analysis.
Identifies market regimes, detects high-probability reversal entries,
and rates each signal 1–5 stars so you know exactly how much conviction to trade with.

─────────────────────────────────────────
WHAT IT MEASURES
─────────────────────────────────────────
imagen

▸ VELOCITY — how fast the VWAP is moving, normalized by volatility.
Values > +0.8 = rising momentum. Values < -0.8 = falling momentum.
SURGE / RISING / UP / FLAT / DOWN / FALLING / CRASH shown in the panel.

▸ PRESSURE — how far price is stretched from VWAP, measured in standard
deviations (σ). Values near 0 = price at VWAP. Values > ±2σ = extreme
extension, strong mean-reversion candidate.

▸ TURBULENCE — the ratio of current velocity volatility to its 50-bar average.
< 0.8 = calm, trending market (LAMINAR). > 1.3 = choppy, avoid entries.
Only trade when turbulence is low.

▸ REGIME SCORE — 0–100% score summarizing overall flow quality.
> 60% = clean conditions. < 30% = stay out.

─────────────────────────────────────────
5 MARKET PHASES
─────────────────────────────────────────

🟡 BREAKOUT — price beyond ±2.8σ outer band. Manage open positions,
do not chase. Mean reversion imminent.

🟢 EXPANSION — velocity rising strongly. Trend is building.
Do not fade the move.

🟠 CONTRACTION — velocity falling. Energy compressing toward VWAP.
Watch for fresh reversal entries.

🔵 LAMINAR FLOW — low turbulence, steady drift. Best window for entries.
Signals here carry the highest quality.

🟣 CONSOLIDATION — mixed signals, no clear bias. Reduce size or wait.

─────────────────────────────────────────
HOW SIGNALS ARE GENERATED
─────────────────────────────────────────

LONG — price crosses back above the inner lower band (−1.5σ)
AND pressure is below −0.8σ (oversold stretch)
AND market is in LAMINAR regime (turbulence < 0.8)

SHORT — price crosses back below the inner upper band (+1.5σ)
AND pressure is above +0.8σ (overbought stretch)
AND market is in LAMINAR regime

In plain terms: the indicator buys when price bounced from below the VWAP
lower band in a calm, trending market. It shorts when price rejected from
above the VWAP upper band in the same conditions.

A cooldown of 5 bars prevents signal clustering (adjustable).
Optional reversal candle filter (pin bar / engulfing) adds confirmation.

─────────────────────────────────────────
SIGNAL QUALITY SCORE — 1 to 5 STARS
─────────────────────────────────────────

Each signal is rated automatically. Use it to size positions:

★☆☆☆☆ 1 — baseline signal, minimal confirmation
★★☆☆☆ 2 — low conviction, reduce size
★★★☆☆ 3 — decent setup, standard size
★★★★☆ 4 — high quality, can add size
★★★★★ 5 — all conditions aligned, maximum confidence

Points are awarded for:
+ Pressure beyond ±2σ (strong extension)
+ Very low turbulence (< 0.5)
+ Full 3/3 MTF alignment
+ Both extreme pressure AND very calm market simultaneously

─────────────────────────────────────────
MULTI-TIMEFRAME CONFLUENCE (MTF)
─────────────────────────────────────────

The indicator reads velocity on 3 timeframes simultaneously:
• Current chart timeframe
• TF 2 (default: 1H)
• TF 3 (default: 4H)

Panel shows each TF with ▲ (bullish velocity) or ▼ (bearish velocity).

FULL ALIGN 3/3 — all timeframes agree → highest conviction
PARTIAL 2/3 — majority agreement → tradeable
DIVERGED 1/3 or less → conflicting signals, skip the trade

─────────────────────────────────────────
HOW TO TRADE — STEP BY STEP
─────────────────────────────────────────

1. Check REGIME first.
→ If TURBULENT or Regime Score < 30% — do not enter. Wait.
→ If LAMINAR or Score > 60% — proceed.

2. Check MTF FLOW BIAS.
→ FULL ALIGN (3/3) = strong directional conviction.
→ PARTIAL (2/3) = ok to trade, smaller size.
→ DIVERGED = skip.

3. Wait for a signal label (▲ LONG or ▼ SHORT) on the chart.
→ More stars = higher conviction = larger position size.

4. Entry: at the signal candle close (or next open).

5. Stop loss: beyond the outer band (±2.8σ).
→ Long: stop below the outer lower band (−2.8σ).
→ Short: stop above the outer upper band (+2.8σ).

6. Take profit: use NEXT TARGET in the panel.
→ Shows the next VWAP band level and the % distance to it.
→ Long target: inner top band → outer top band.
→ Short target: inner bottom band → outer bottom band.

7. If phase switches to TURBULENT — tighten stop or exit.

─────────────────────────────────────────
PANEL GUIDE
─────────────────────────────────────────
imagen

PHASE — current market phase + pressure reading + regime score
REGIME — LAMINAR / MIXED / TURBULENT + progress bar
VELOCITY — trend word + normalized value
PRESSURE — distance from VWAP in σ + bar
TURBULENCE — market noise level + bar
FLOW BIAS — MTF alignment status
[TF arrows] — per-timeframe direction (▲ bull, ▼ bear)
SIGNAL — last signal direction + bars ago
QUALITY — star rating of last signal
NEXT TGT — nearest VWAP band + % distance

─────────────────────────────────────────
ALERTS (11 total)
─────────────────────────────────────────

• Long Signal
• Short Signal
• High Quality Long (4-5★)
• High Quality Short (4-5★)
• Regime: Laminar Flow (Trading Window Open)
• Regime: Turbulent (Avoid Trading)
• Phase: Breakout
• Phase: Expansion
• Phase: Contraction
• Full MTF Alignment (3/3)
• Pressure Extreme (>2σ)

Recommended setup: enable "Regime: Laminar Flow" and "High Quality Long/Short"
alerts to get notified only when market conditions are optimal.

─────────────────────────────────────────
SETTINGS
─────────────────────────────────────────

VWAP Window — lookback for VWAP calculation (default 50)
Inner Band σ — inner band distance, signals trigger here (default 1.5)
Outer Band σ — outer band distance, stop loss reference (default 2.8)
Show Signals — toggle signal labels on/off
Cooldown (bars) — minimum bars between signals (default 5)
Reversal Filter — require pin bar or engulfing candle (default ON)
Show Panel — toggle info panel
TF 2 / TF 3 — second and third timeframes for MTF confluence

─────────────────────────────────────────
CREDITS
─────────────────────────────────────────

Built on the same VWAP flow engine as Plasma Flow [LunqFX] by the same author.
This indicator extends that framework with a dedicated signal quality scoring
system and enhanced multi-timeframe confluence layer.

© LunqFX

Exención de responsabilidad

La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.