OPEN-SOURCE SCRIPT

Volume Divergence Indicator

Updated
The Volume Divergence Indicator is a powerful tool that can help traders identify potential price reversals in the market by analyzing volume data. The indicator has several features, including divergences signals, volume spikes, volume contractions, and volume trend signals.

Unlike most divergence indicators, this one is focused on providing non-repainting alerts. That is why I chose not to use pivot points.

The Volume Divergence Indicator can be used as an overlay or a non-overlay. The overlay mode displays the indicator on top of the price chart, while the non-overlay mode displays the indicator below the price chart.

The indicator has five alerts that can be used to generate alerts:

  • Bullish Divergence: This alert is generated when prices are making lower lows, but volume is making higher lows. This suggests that the selling pressure is weakening, and a bullish reversal may be imminent.

  • Bearish Divergence: This alert is generated when prices are making higher highs, but volume is making lower highs. This suggests that the buying pressure is weakening, and a bearish reversal may be imminent.

  • Volume Spike: This alert is generated when volume spikes above a certain threshold, such as two standard deviations above the moving average. This suggests that there is unusual buying or selling activity in the market, and traders may want to pay attention to the price movements that follow.

  • Volume Contraction: This alert is generated when volume contracts to a certain level, such as two standard deviations below the moving average. This suggests that there is little buying or selling activity in the market, and traders may want to be cautious until volume picks up again.

  • Volume Trend: This alert is generated when volume trends above or below the moving average for a certain number of periods, such as five or ten. This suggests that there is a sustained increase or decrease in buying or selling pressure, and traders may want to adjust their trading strategy accordingly.


To customize the indicator settings, users can adjust the following inputs:
  • Choose overlay mode: select either Overlay or Non-Overlay
  • Price and volume lookback: set the number of bars to look back for price and volume data
  • Bull and bear sensitivity: adjust the sensitivity of the bullish and bearish divergences
  • Volume MA length: set the length of the moving average used to calculate volume spikes and contractions
  • Sensitivity of spikes: adjust the sensitivity of the volume spikes
  • Sensitivity of contractions: adjust the sensitivity of the volume contractions
  • Trend sensitivity: set the number of periods to identify the volume trend


The Volume Divergence Indicator can be a valuable addition to any trader's toolkit. It can help traders identify potential price reversals in the market, as well as unusual buying or selling activity.

I am open to suggestions for further updates or additions.
Release Notes
The indicator now prints on 2 panes, thanks to the new force_overlay feature.
Divergenceforecastingindicator-freesentimentVolume

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


🔥Get the Cyatophilum Indicators today and automate them on Binance! => blockchainfiesta.com/strategies/

Discord Server: discord.gg/RVwBkpnQzm

I am taking PineScript Commissions ✔
=> blockchainfiesta.com/contact/
Also on:

Disclaimer