OPEN-SOURCE SCRIPT
PG Quant Sentiment Index & Dashboard

Strategy Summary: Quant Sentiment & Volatility MasterThis system is a hybrid quantitative engine designed to filter market noise by combining Derivative Sentiment with Volatility Analysis.
How it Works:
The Volatility Engine (VH): * It identifies high-conviction "stances" (Bullish/Bearish) using a 5 EMA and high volume.It measures volatility speed via an ATR Crossover. If the fast ATR is above the slow ATR, volatility is accelerating (
SCORE \pm 2$). If below, volatility is consolidating (
SCORE \pm 1$).This score provides a structural "context" that stays persistent even during quiet bars.
The Sentiment Engine (WSI): * It tracks Strike-level Put-Call Ratios (PCR) for Price and Volume, alongside Daily and Hourly Open Interest (OI) build-ups.This data is aggregated into a Weight-Sum Index (WSI).
The Dashboard: * The dashboard calculates a live score for each metric. The final WSI Smooth (highlighted in Dark Blue) is the master signal. BULLISH/BEARISH states are triggered only when the sentiment index reverses by a specific percentage threshold, ensuring you only catch significant trend shifts.
The Visuals: * Histogram Bars: Represent raw market sentiment.
Solid Line: The smoothed WSI, colored dynamically to represent market status (Recovering, Bullish, Dropping, or Bearish).
How it Works:
The Volatility Engine (VH): * It identifies high-conviction "stances" (Bullish/Bearish) using a 5 EMA and high volume.It measures volatility speed via an ATR Crossover. If the fast ATR is above the slow ATR, volatility is accelerating (
The Sentiment Engine (WSI): * It tracks Strike-level Put-Call Ratios (PCR) for Price and Volume, alongside Daily and Hourly Open Interest (OI) build-ups.This data is aggregated into a Weight-Sum Index (WSI).
The Dashboard: * The dashboard calculates a live score for each metric. The final WSI Smooth (highlighted in Dark Blue) is the master signal. BULLISH/BEARISH states are triggered only when the sentiment index reverses by a specific percentage threshold, ensuring you only catch significant trend shifts.
The Visuals: * Histogram Bars: Represent raw market sentiment.
Solid Line: The smoothed WSI, colored dynamically to represent market status (Recovering, Bullish, Dropping, or Bearish).
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
Follow @i2gain on X.COM
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
Follow @i2gain on X.COM
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.