OPEN-SOURCE SCRIPT

Market Sentiment Index US Top 40 [Pt]

205
▮Overview

Market Sentiment Index US Top 40 [Pt} shows how the largest US stocks behave together. You pick one simple measure—High Low breakouts, Above Below moving average, or RSI overbought/oversold—and see how many of your chosen top 10/20/30/40 NYSE or NASDAQ names are bullish, neutral, or bearish.

This tool gives you a quick view of broad-market strength or weakness so you can time trades, confirm trends, and spot hidden shifts in market sentiment.

▮Key Features

► Three Simple Modes
  • High Low Index: counts stocks making new highs or lows over your lookback period
  • Above Below MA: flags stocks trading above or below their moving average
  • RSI Sentiment: marks overbought or oversold stocks and plots a small histogram

► Universe Selection
  • Top 10, 20, 30, or 40 symbols from NYSE or NASDAQ
  • Option to weight by market cap or treat all symbols equally

► Timeframe Choice
  • Use your chart’s timeframe or any intraday, daily, weekly, or monthly resolution

► Histogram Smoothing
  • Two optional moving averages on the sentiment bars
  • Markers show when the faster average crosses above or below the slower one

► Ticker Table
  • Optional on-chart table showing each ticker’s state in color
  • Grid or single-row layout with adjustable text size and color settings


▮Inputs

► Mode and Lookback
  • Pick High Low, Above Below MA, or RSI Sentiment
  • Set lookback length (for example 10 bars)
  • If using Above Below MA, choose the moving average type (EMA, SMA, etc.)

► Universe Setup
  • Market: NYSE or NASDAQ
  • Number of symbols: 10, 20, 30, or 40
  • Weights: on or off
  • Timeframe: blank to match chart or pick any other

► Moving Averages on Histogram
  • Enable fast and slow averages
  • Set their lengths and types
  • Choose colors for averages and markers

► Table Options
  • Show or hide the symbol table
  • Select text size: tiny, small, or normal
  • Choose layout: grid or one-row
  • Pick colors for bullish, neutral, and bearish cells
  • Show or hide exchange prefixes


▮How to Read It

► Sentiment Bars
  • Green means bullish
  • Red means bearish
  • Near zero means neutral

► Zero Line
  • Separates bullish from bearish readings

► High Low Line (High Low mode only)
  • Smooth ratio of highs versus lows over your lookback

► MA Crosses
  • Fast MA above slow MA hints rising breadth
  • Fast MA below slow MA hints falling breadth

► Ticker Table
  • Each cell colored green, gray, or red for bull, neutral, or bear


▮Use Cases

► Confirm Market Trends
  • Early warning when price makes highs but breadth is weak
  • Catch rallies when breadth turns strong while price is flat

► Spot Sector Rotation
  • Switch between NYSE and NASDAQ to see which group leads
  • Watch tech versus industrial breadth to track money flow

► Filter Trade Signals
  • Enter longs only when breadth is bullish
  • Consider shorts when breadth turns negative

► Combine with Other Indicators
  • Use RSI Sentiment with trend tools to spot overextended moves
  • Add volume indicators in High Low mode for breakout confirmation

► Timeframe Analysis
  • Daily for big-picture bias
  • Intraday (15-min) for precise entries and exits

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.