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).
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Follow @i2gain on X.COM
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Follow @i2gain on X.COM
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.