Dual Volume Divergence Line (DVD/Line)

Dual Volume Divergence Line (DVD/Line)

1. Introduction

The Dual Volume Divergence Line (DVD/Line) is a sophisticated technical analysis tool designed to detect divergences between price and volume using two complementary volume indexes: the Positive Volume Index (PVI) and the Negative Volume Index (NVI). Its main goal is to provide early signals of potential trend reversals by analyzing volume behavior.

In addition to plotting a combined divergence line (DVD), the indicator also draws dynamic bands and labels bullish and bearish divergences — both regular and hidden — directly on the chart. This makes it a powerful visual aid for identifying trading opportunities.

2. Indicator Foundation

The calculation starts with a typical price, obtained as the average of the high, low, and close for each bar. Based on this input, two indices are constructed:

  • PVI (Positive Volume Index): Accumulates the typical price increase when the current bar closes higher than the previous one.
  • NVI (Negative Volume Index): Accumulates the typical price decrease when the current bar closes lower than the previous one.

Both indexes are smoothed using a weighted average, and their divergence from price is calculated. The difference between the PVI and NVI divergences forms the basis of the DVD Line, which reflects the directional pressure of volume.

This DVD Line is further compared to a linear regression to visually detect potential momentum shifts.

3. Calculation and Components

Customizable Parameters

  • zaman: Sampling period for smoothing PVI/NVI (default: 17).
  • genislik: Width for smoothing and band projection (default: 12).
  • takip: Length for linear regression (default: 3).
  • carpan: Multiplier to adjust indicator sensitivity.
  • gosterBand: Toggle band visualization.
  • gosterNormal: Show regular divergences (on/off).
  • gosterGizli: Show hidden divergences (on/off).
  • Ir: Divergence detection range.
  • Ntype: Choose raw (Dvdi) or smoothed (DVD) data for divergence detection.

Main Calculations

  • PVI & NVI Divergences: Computed by subtracting their respective weighted averages from the current value.
  • DVD Line (Dvdi): The difference between PVI and NVI divergences, multiplied by a factor.
  • Smoothed DVD (DVD): Weighted average of Dvdi added to the typical price.
  • Regression Line (DVD2): A linear regression of the DVD, used for conditional coloring.

Dynamic Bands

Upper and lower bands are calculated using the Root Mean Square (RMS) of the highest and lowest DVD values over the smoothing window. These bands act as dynamic zones to evaluate extreme conditions and are rescaled to highlight outliers.

4. Divergence Detection

The indicator identifies two main types of divergences:

  • Regular Divergences: Price makes a new high/low, but the oscillator does not confirm it.
  • Hidden Divergences: Price does not make a new high/low, but the oscillator does.

Divergences are detected by locating pivot points in both price and the selected oscillator (IrGo). When a new pivot is formed, it is compared to the previous one, and if a divergence condition is met, the appropriate label is drawn:

  • "Bull" for regular bullish divergence.
  • "hid.Bull" for hidden bullish divergence.
  • "Bear" for regular bearish divergence.
  • "hid.Bear" for hidden bearish divergence.

All labels are offset using ATR to avoid overlapping with price bars.

5. How to Interpret the Indicator

  • DVD Line: Represents volume directional strength. Rising above its regression line (DVD2) suggests bullish pressure, while falling below it indicates bearish momentum.
  • Bands: Function as dynamic overbought and oversold levels. Crosses or rejections around these levels can signal potential reversals.
  • Divergences: Serve as advanced warning signals, especially effective near key support or resistance zones.

The indicator works well across different timeframes, making it suitable for scalpers, intraday traders, and swing traders alike.

6. Indicator Settings

Here’s a breakdown of each adjustable parameter:

  • zaman (Sampling Period): Controls signal sensitivity. Lower values yield more signals but may be noisier.
  • genislik (Band Width): Affects smoothing degree. Higher values result in smoother lines.
  • takip (Trailing Length): Number of bars for linear regression, used for coloring the DVD Line.
  • carpan (Multiplier): Adjusts how strongly PVI and NVI divergences influence the DVD Line.
  • gosterBand: Enables/disables band visualization.
  • gosterNormal and gosterGizli: Toggle the display of regular and hidden divergences.
  • Ir: Sets the pivot detection range; higher values result in fewer but stronger signals.
  • Ntype: Allows switching between raw (Dvdi) and smoothed (DVD) divergence sources.

It is recommended to test different configurations based on the asset and timeframe to optimize the indicator’s performance.

7. Indicator Code

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

avatar
Register or

Likes

avatar avatar
Related users ' posts
Monobrow Hi Daniele Thank you for the indicator, it looks very good. However, I have a problem so...
avatar
Anonymous Thanks very much for sharing, look forward to testing this idea out.
mathiasKN Thank you Daniele for making this script, I know its been some time since the release but wo...
Barrabas15 Apparently, according to the attached data, there is an error in the indicator code. Attach...
Barrabas15 The files are at the end of the following link: https://www.prorealcode.com/topic/time-seg...
robertogozzi Thank you Barrabas15, the correct code is at https://www.prorealcode.com/topic/time-segmente...
Nicolas esta possible
bolsatonimora2 Hola Nicolas, perdona la molestia, pero podrias codificar el screener para rupturas de sopor...
Nicolas Utilice los foros para solicitar una codificación personalizada.
GARNIEPI hello I am looking for an anchored vwap intraday, indicator which allows you to visualize th...
withoutwings To be able to flexibly wrap around the full 24h (i.e. past midnight), or to use just a singl...
yeoreum Thank you very much for the screener, it reminds me on Minervini VCP. How to change th...
reecet any codes like this but in minutes and hours rather than days?
PHAN100 bonjour, je viens de tester ce screener, je constate une anomalie...il ne renvoie pas l'e...
jaginho Bonjour Vivien, je n'arrive pas à comprendre ce screener... En tout cas merci pour tes contr...
avatar
Anonymous Superb, merci!
larouedegann It doesn't work
ggolfet it seems it's not working on prorealtime 11. I changed MACDSignal to MACDSign in order to av...
juanj Please note that the indicator is meant for PRT 10.3
1Randy I would be interested an invite to your blog. I am still learning about the VSA and it looks...
repropel Buenos días TACBOLSA. Yo también estoy interesado en visitar tu blog. Podrías enviarme una i...
mobychix Hi, I just joined Pro Realtime and am very interested in VSA. I have read some books and did...
Maxime Baudin Very useful! Thanks Mat, and Happy New Year
nicko Great work. Thank you. However I am having trouble getting it to print in the first bar. If ...
Marie-Eve Vergoz Bonsoir - Voici l'erreur qui est signalée lorsque je souhaite utiliser cet indicateur : il...
Meta Signals Pro Pleasure ! Please let us know if you make good trades with it and if you see improvements we...
francis59 Bonjour, Bonjour, comment puis-je créer un screener basé sur cet indicateur, qui affiche le...
Trader Sab I am curious to try it how, however I get an error message for line 47 and 48 - drawsegment,...
Om Hello, thanks for sharing! Getting a message that Variable P is undefined?
matin Intraday Average Volume Indicator Not working, what can i do plz
LucioleLucide Clean view, thanks for sharing
dertopen hi where i can found the window for candle configuration?
paolosab69 Ciao! . I have seen the pictures that explain this metod but i don't understand when is mome...
Vinks_o_7 Apirine also offers a very interesting update of the OBV...
TACBOLSA
6 years ago
dario ti please can you help me to understand? i know i am wrong: Long Histogram = High Volume S...
TAC Bolsa hi, I have already seen the problem and requested that it be removed until an adequate so...
sixeight Hey TAC, Did you ever find a solution to this?
Vinks_o_7 b=close > low and volume > high How can we compare volume and high of the day? (orang...
TAC Bolsa If to understand something you resort to compare Oranges and bananas. You go bad, Without e...
giumagi good morning Sir, great job your indicators! How can I reach your website or blog? please..t...
Gianluca THANK YOU!!!!!
JOSEBA que relaccion tiene la numeración de las barras del 1 al 10 que tiene cada número Tengo dos...

Top