OPEN-SOURCE SCRIPT

VQI Z-Score Pro Suite [MTF + Divs]

99
Description:

The VQI Z-Score Pro Suite is a premium-grade volatility oscillator designed to filter market noise and identify high-probability reversal or continuation points. It evolves the classic Volatility Quality Index (VQI) by applying advanced smoothing and statistical normalization (Z-Score).

Unlike standard indicators that lag significantly, this suite uses advanced moving averages (JMA, FRAMA, ALMA) to remain responsive while filtering out "bad volatility" (choppy markets).

🚀 Key Features:

Advanced MA Engine: Choose from over 20 smoothing methods, including Jurik (JMA), ALMA, and Kaufman (KAMA), to perfectly tune the indicator to your asset.

Statistical Thresholds: Uses Z-Score standard deviations to objectively identify market extremes:

> 1.64: Start of Momentum (90% Probability)

> 1.96: Strong Trend (95% Probability)

> 2.58: Extreme / Exhaustion (99% Probability)

Auto-Adaptive Length: Optional feature that adjusts the Z-Score lookback period dynamically based on market volatility (ATR).

Smart Divergences: Automatically detects Regular (Reversal) and Hidden (Continuation) divergences between Price and Volatility.

📊 Pro Dashboard: Includes a glass-morphism information panel that displays:

Current Trend Status (with Unicode arrows)

Z-Score Value (Color coded)

Active Divergences

Timeframe & Settings

🛠 How to use:

Trend Trading: Look for the Z-Score to cross 1.64 (Yellow) to confirm a breakout.

Reversals: Watch for the Z-Score hitting Extreme levels (>2.58) combined with a Regular Divergence label (R+ / R-).

Multi-Timeframe: Enable MTF in settings to view higher timeframe volatility trends while trading on lower timeframes.

📘 Operating Manual: VQI Z-Score Pro Suite [Diamond Edition]
1. Introduction & Philosophy
The VQI Z-Score Pro is not just a simple oscillator. It is an advanced statistical tool designed to solve the main problem traders face: distinguishing "good" volatility (Trend) from "bad" volatility (Noise).

The indicator leverages two powerful mathematical concepts:

VQI (Volatility Quality Index): An algorithm that measures the quality of price movement (how "clean" the trend is).

Z-Score (Statistical Normalization): Transforms raw VQI values into Standard Deviations. This allows us to objectively know if a movement is statistically significant or extreme.

2. Visual Interpretation (Chart & Dashboard)
The Chart (Histogram)
The indicator displays bars (columns) oscillating around a zero line.

Gray Zone (-1.64 to +1.64): Market noise or consolidation. No statistical edge.

Yellow Zone (> 1.64): Momentum Start. Price has broken statistical normality (90% confidence).

Orange Zone (> 1.96): Strong Trend. Healthy directional movement (95% confidence).

Green/Red Zone (> 2.58): Extreme/Climatic. Exceptional movement (99% confidence). This may indicate a violent pump/dump or imminent exhaustion (top/bottom).

The "Glass" Dashboard (Info Panel)
Located in the top right, it provides an instant snapshot:

Mode: The Moving Average type and Timeframe currently in use.

Z-Score: The exact numerical value.

Status: Indicates current sentiment with arrows (e.g., ▲ STRONG BULL).

Divergence: Signals if a divergence is active (REG = Reversal, HID = Continuation).

Settings: Displays the calculation length (useful if using Auto-Adaptive mode).

3. Parameters Guide (Inputs)
⚙️ General Settings
Price Smoothing Length: (Default: 15). Determines how much the price is "smoothed" before calculation. Low values (5-10) for reactive scalping, high values (20-30) for clean swing trading.

MA Mode: The core of the system. Choose the smoothing algorithm:

Recommended: JMA (Jurik - Perfect balance), ALMA (Arnaud Legoux - Great for reducing lag), KAMA (Kaufman - Adaptive).

Classic: EMA, SMA, RMA.

📊 Z-Score Settings (Auto-Tuning)
Auto-Adaptive Length? (Default: False).

OFF: Uses a fixed length (Default 100). Ideal for standard analysis.

ON: The indicator adapts the Z-Score length based on volatility (ATR). If the market is frantic, it shortens the period to be more reactive; if calm, it lengthens it to filter false signals.

🎯 Signal Thresholds
These levels are derived from the Normal Distribution (Gaussian):

1.64: 90% Threshold. Filters baseline noise.

1.96: 95% Threshold. Confirms the trend.

2.58: 99% Threshold. Rare event (Black Swan or Exhaustion).

💎 Divergences (Premium)
The system automatically detects discrepancies between Price and Oscillator:

Regular (R+ / R-): Solid Lines. Indicate a possible Reversal. (e.g., Price makes lower lows, but the oscillator makes higher lows).

Hidden (H+ / H-): Dashed Lines. Indicate trend Continuation. (e.g., Price makes higher lows, oscillator unloads making lower lows).

4. Technical Trading Strategies
Strategy A: Trend Following (Breakout)
Ideal for catching the start of a movement.

Setup: Wait for the histogram to be gray (consolidation).

Trigger: The histogram breaks the 1.64 threshold and becomes colored (Yellow/Orange).

Confirmation: The Dashboard reads "BULLISH" or "STRONG BULL".

Exit: When the histogram falls back below 1.64 or changes to the opposite color.

Strategy B: Mean Reversion (Contrarian)
Ideal for catching tops and bottoms (Top/Bottom fishing).

Setup: The histogram reaches extreme levels > 2.58 (Bright Green or Bright Red).

Trigger: A Regular Divergence (R+ or R-) appears. This indicates that momentum is exhausted even if the price is still moving.

Entry: At the close of the candle with the Divergence Label.

Strategy C: Multi-Timeframe (MTF)
To filter false signals on lower timeframes (e.g., 5 min).

Go to Settings > Multi-Timeframe.

Check "Enable MTF" and set "Higher Timeframe" to 1 Hour or 4 Hours.

Rule: Trade on your 5-min chart ONLY in the direction indicated by the higher timeframe Z-Score (e.g., if MTF is Green/Bullish, only take long positions).

5. Technical Notes & Troubleshooting
Repainting: The indicator does NOT repaint on the current timeframe. In MTF mode, historical bars may update until the higher timeframe candle closes (standard TradingView behavior).

Performance: If the chart appears slow on very low timeframes (1 second), disable "Divergences" to lighten the calculation load.

Chart Hygiene: The system includes a "Garbage Collector" that automatically deletes old divergence lines to keep the chart clean (max 30 visible objects).

Disclaimer: This tool provides statistical analysis and does not constitute financial advice. Always use stop losses and proper risk management.

Aviso legal

As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.