OPEN-SOURCE SCRIPT

ZigZag Volume Profile [ChartPrime]

11 623
⯁ OVERVIEW
ZigZag Volume Profile [ChartPrime] combines swing structure with volume analytics by plotting a ZigZag of major price swings and overlaying a detailed volume profile around each swing. At the end of each swing, it highlights the Point of Control (POC) — the price level with the highest traded volume — and extends it forward to identify key areas of potential support or resistance.

⯁ KEY FEATURES
  • ZigZag Swing Detection:
    Automatically detects swing highs and lows based on a user-defined length, creating clean visual segments of market structure.
    These segments act as boundaries for volume profile calculations.

    Pine Script®
    swingHigh = ta.highest(swingLength) swingLow = ta.lowest(swingLength)
    ekran görüntüsü
  • ZigZag Channel Visualization:
    The ZigZag structure is connected with sloped lines, forming a visual “channel” of the price movement.
    The ZigZag can optionally, scaled by ATR.
    ekran görüntüsü
  • Volume Profile Around Each Swing:
    For every completed swing (high to low or low to high), the indicator constructs a full volume profile using user-defined bin counts.
    It scans volume across price levels in the swing and plots histogram-style bins using a gradient color to indicate volume magnitude.
    ekran görüntüsü
  • Dynamic Bin Width and Slope Adjustment:
    Bins are distributed across a vertical ATR-based range, and their width is adjusted based on the percentage of total swing volume.
    The volume fill direction is adapted to the swing’s slope for visually aligned plotting.
    ekran görüntüsü
  • POC Detection and Extension:
    The highest volume bin in each swing is identified as the Point of Control (POC).
    This level is plotted with a thicker line and extended horizontally into the future as a key reaction level.
    ekran görüntüsü
  • Automatic POC Expiry on Price Interaction:
    POC lines are continuously extended unless breached by price.
    When price crosses the POC level, the extension is terminated — signaling that the level may have been absorbed.

  • Clean Volume Bin Visualization:
    Bin colors range from green (low volume) to blue (higher volume), with the POC always marked in red by default for easy identification.
    Volume percentages are optionally labeled at each bin level.


    Flexible Swing Profile Parameters:
    Users can control:
  • Number of volume bins
  • Bin width
  • Channel width (ATR factor)
  • Visibility of the swing channel or POC lines

  • Efficient Memory Handling:
    Old POC lines and volume profiles are automatically removed from memory after a threshold to keep charts clean and performant.


⯁ USAGE
  • Use ZigZag swings to define market structure visually.
  • Analyze volume profile around each swing to understand where most trading activity occurred.
  • Use POC extensions as dynamic support/resistance zones for entries, stops, or take-profits.
  • Watch for price interaction with extended POC lines — breaks may suggest absorbed liquidity or breakout potential.
  • Use the ATR-based channel width to adapt profiles based on market volatility.


⯁ CONCLUSION
ZigZag Volume Profile [ChartPrime] offers a powerful fusion of structure and volume. By plotting detailed volume profiles over each price swing and extending the POC as actionable S/R levels, this tool provides deep insight into market participation zones — giving traders a tactical edge in both ranging and trending environments.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.