OPEN-SOURCE SCRIPT

Daily Range % with Conditional SPX Direction

39
This indicator visualizes the short-term market sentiment by combining the trend of the S&P 500 index (SPX) with daily price volatility (DP%).

Key Features:

Calculates a 5-period Exponential Moving Average (EMA) of SPX to detect trend direction:
Rising EMA → Uptrend
Falling EMA → Downtrend
Calculates a 5-period Simple Moving Average (SMA) of Daily Price Range % (DP%) to assess volatility trend:
Rising DP% → Increasing volatility
Falling DP% → Decreasing volatility
Background Colors:

Green: SPX trend up & volatility down → Bullish
Yellow:
SPX trend up & volatility up, or
SPX trend down & volatility down → Neutral
Red: SPX trend down & volatility up → Bearish
On-screen Labels:

Displays SPX trend direction (⬆️ / ⬇️)
Displays volatility direction (⬆️ / ⬇️)
Displays overall market sentiment: Bullish / Neutral / Bearish
This tool is designed to help traders quickly assess the relationship between trend and volatility, aiding in market environment analysis and discretionary trading decisions.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.