OPEN-SOURCE SCRIPT
Zaktualizowano

Sentiment Square

1 028
The Sentiment Square is a multi-timeframe (MTF) and multi-length volume analysis tool designed for TradingView. It provides a top-down visualization of market conviction by calculating the ratio of bullish volume to total volume across 16 different data points simultaneously.


1.Core Logic: How it Works

The indicator calculates a Bullish Volume Ratio (BVR) for every square in the grid.
BVR = sum ( Volume of Up Candles)/ sum(Total Volume) X 100

Up Candle: Any candle where Close > Open .
Total Volume: The sum of all volume within the lookback window.

Each percentage represents the "Share of Power" held by buyers. For example, a value of 70% means bulls provided 70% of the volume, while bears provided the remaining 30%.

2. Visual Interface
The indicator uses a Transposed Matrix layout to match standard top-down trading analysis:
X-Axis: Timeframes: Moves from your lowest selected timeframe (Left) to your highest (Right).
Y-Axis: Lookback Windows: Moves from short-term momentum (Top) to long-term structure (Bottom).

Color Definitions
  • Green (Bullish): The percentage is above your Neutral Max (default 55%). Brighter green indicates extreme conviction (>70%).
  • Red (Bearish): The percentage is below your Neutral Min (default 45%). Brighter red indicates extreme selling (<30%).
  • Gray (Neutral): The percentage falls between 45% and 55%. This indicates a "tug-of-war" or sideways consolidation where neither side has a decisive majority.


Input Settings
  • Timeframes Window: Select four different intervals (e.g., 15m, 1h, 4h, 1D).
  • Speed Window: Set four different lookback lengths (e.g., 20, 50, 100, 200 bars).
  • Neutral Zone: Adjust the sensitivity of the Gray boxes. A wider range (e.g., 40%–60%) filter out more noise but responds slower to new trends.


How to Interpret the Data

  • Vertical Alignment (Columns): If a whole column is Green, that specific timeframe is bullish across all horizons (from fast momentum to slow structure).
  • Horizontal Alignment (Rows): If a whole row is Green, it means that specific "window length" is showing buying pressure across all timeframes.
  • The "Waiting Time" Signal: When a box is Gray, the volume is balanced. Traders typically wait for the percentage to move out of the 45%–55% range before confirming an entry.
  • Trend Resilience: If the 15M (tactical) squares turn Red while the 1D (structural) squares remain Green, the market is likely undergoing a healthy pullback rather than a total reversal.


Technical Limitations
  • Data Lag: Higher timeframe squares (like 1D or 4H) only update when their respective candles close.
  • Volume Requirement: This indicator requires volume data. It is most effective on Centralized Exchanges (Stocks, Crypto, Futures). On Forex, it uses "Tick Volume," which serves as a proxy for activity.


Common Trade Setup Examples
By observing the transition of colors and percentages across the matrix, you can identify high-probability market conditions.

1.The Trend Continuation (The "Dip-Buy")

  • Condition: The right-most columns (4H and 1D) and the bottom rows (100 and 200) are solid Green.
  • Setup: The top-left squares (15M / 20 Window) flip to Red or Gray.
  • Trigger: Wait for the 15M / 20 square to flip back to Green (above 55%).
  • Logic: The macro structure is bullish; the red squares indicate a temporary pullback that has now found buyers.

2. The Volatility Squeeze (The "Wait for Breakout")
  • Condition: A cluster of Gray squares (45%–55%) appears in the middle of the matrix.
  • Logic: Volume is perfectly balanced between buyers and sellers. This often precedes a massive "expansion" move.
  • Strategy: Avoid entering while the cluster is Gray. Wait for the majority of the cluster to flip to either solid Green or solid Red.


3. The Top/Bottom Exhaustion
  • Condition: All 16 squares are Vibrant Green (above 70%) or Vibrant Red (below 30%).
  • Logic: The market is "over-extended." While the trend is strong, the probability of a reversal increases because there are few buyers/sellers left to push the price further.
  • Strategy: Tighten stop-losses or look for "Divergence" where the price makes a new high but the percentages in the 20-window start dropping toward 60%.


Summary of the "Wait Time" Metric
The closer a number is to 50%, the more "waiting time" is required. As the numbers move toward 0% or 100%, the market conviction is increasing, and the "actionable" window is opening.


Additional Information:
1. Core Logic
The Sentiment Square calculates the Bullish Volume Ratio (BVR) across 16 data points. It measures "Share of Power" by dividing the volume of "Up Candles" (where Close > Open) by the total volume within a lookback window.

2. Visual Grid Layout
  • X-Axis (Timeframes): Displays user-selected intervals from lowest (Left) to highest (Right).
  • Y-Axis (Lookback Windows): Displays "Speeds" from short-term momentum (Top) to long-term structural sentiment (Bottom).


3. Color Definitions

  • Green (>55%): Bullish conviction. Bright green (>70%) signals extreme strength.
  • Red (<45%): Bearish conviction. Bright red (<30%) signals extreme selling.
  • Gray (45%–55%): Neutral "Waiting Time." Indicates volume balance or consolidation.


4. Common Trade Setups
  • The Dip-Buy: Occurs when macro columns (Right) are Green but tactical squares (Top-Left) temporarily turn Red/Gray. Entry is triggered when tactical squares flip back to Green.
  • Volatility Squeeze: Identified by a cluster of Gray squares. Traders wait for a majority of the cluster to flip to a solid color before entering.
  • Exhaustion: When all 16 squares reach extreme vibrant colors, the market is over-extended, increasing the probability of a reversal.
Informacje o Wersji
alert updated

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.