PROTECTED SOURCE SCRIPT

VWAP Slices

47
VWAP Slices is a time-based analytical tool that helps traders evaluate market behavior across custom-defined periods. Instead of looking at VWAP, RSI, or MFI in isolation, this script allows users to select up to three specific time windows — for example, earnings weeks, Fed meetings, or major news cycles — and analyze how price interacted with volume, momentum, and money flow within each of those slices.

For each active period, the script calculates:

  • VWAP, based on HLC3 × Volume, giving a volume-weighted price anchor
  • Total traded volume
  • Number of bars (candles) in the period
  • RSI, computed using a custom-built relative strength algorithm from closing prices
  • MFI, calculated from HLC3 and volume to assess money flow direction and strength

These statistics are not simply shown independently — they are designed to be viewed in context with each other. For instance:

VWAP levels help identify fair value and possible accumulation/distribution zones within a time range.

RSI shows internal momentum strength, while MFI adds a volume-sensitive confirmation.

Comparing multiple periods side-by-side allows traders to see shifts in trend behavior and volume dynamics over time.

The script offers two visualization styles:

  • Labels placed on-chart near price, summarizing each period
  • A combined table showing all periods together for comparative analysis

Users can define:

  • Start and end dates of each period
  • Background color and visibility per period
  • Whether to display labels, a summary table, or both


It also computes aggregate metrics, including:

  • A volume-weighted combined VWAP across all selected periods
  • Average RSI and MFI, giving a broader sense of directional bias and money flow health

This tool is especially useful for:

  • Assessing how price and volume behaved around specific market events
  • Comparing accumulation vs distribution across different timeframes
  • Supporting thesis-driven trading by segmenting history into actionable chunks


This is not a mashup, but a purposeful framework for slicing market history into analytical blocks — combining price anchors with volume and momentum indicators to help traders better interpret price structure and trend context.

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.