OPEN-SOURCE SCRIPT

Volume Detection NZS + Alert

946
Volume Detection NZSDescriptionThe Volume Detection NZS is a visual analysis tool designed to identify significant liquidity events and categorize the underlying "pressure" (buying vs. selling) behind those spikes. Unlike standard volume bars, this indicator isolates high-activity candles and uses a weighted calculation to estimate how much of that volume was driven by aggressive buyers versus aggressive sellers.How It WorksThe script operates on two primary layers: Spike Detection and Pressure Attribution.Volume Spike Logic:The indicator calculates a Simple Moving Average (SMA) of volume over a user-defined period (default is 20). A "Spike" is triggered only when the current bar's volume exceeds this SMA multiplied by a specific threshold (default 1.5x).$[ \text{Volume} > (\text{SMA}(\text{Volume, 20}) \times 1.5) ]$Pressure Calculation (The "Inside" Volume):Instead of simply looking at whether a candle closed green or red, the script uses the candle's range and close position to attribute volume:Buy Volume: Estimated based on how close the price finished to the high of the candle.Sell Volume: Estimated based on how close the price finished to the low.Delta: The difference between these two determines if the bar is labeled as "Buying" or "Selling" pressure.Visual Elements:Bar Coloring: The chart bars only change color during a Volume Spike. Bullish spikes turn bright green; Bearish spikes turn dark/black.Dashboard: A real-time table in the top-right corner displays the raw Buy/Sell volume breakdown and the current pressure status for the active candle.How to UseTrend Confirmation: Use the green spikes to confirm the strength of a breakout or the start of a new bullish leg.Exhaustion Signals: Large spikes at the end of an extended move can signal "climax" volume, suggesting a potential reversal.Filtering Noise: Because the indicator only colors bars on significant volume spikes, it helps traders ignore low-liquidity chop.SettingsVolume MA Length: Adjusts the lookback period for what the script considers "normal" volume.Volume Spike Multiplier: Higher values make the indicator more selective, only highlighting the most extreme volume events.

How to Set Up Alerts (Step-by-Step)
To receive desktop pop-ups, sounds, or mobile notifications for the Volume Detection NZS, follow these steps:

Apply to Chart: Ensure the indicator is loaded on your chart.

Open Alert Menu: Click the Clock Icon in the right-side toolbar or press Alt + A.

Select Condition: In the "Condition" dropdown, select Vol Detector NZS.

Choose Signal: * Select Bullish Volume Spike for high-volume buying pressure.

Select Bearish Volume Spike for high-volume selling pressure.

Trigger Frequency: Set this to Once Per Bar Close to avoid "repainting" or false signals before the candle is finished.

Enable Desktop Pop-up:

Go to the Notifications tab in the alert window.

Check the box for Show Pop-up.

(Optional) Check Play Sound if you want an audio cue.

Create: Click the Create button. Your alert is now active and will trigger a desktop window even if you are on another browser tab.

Отказ от ответственности

Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.