OPEN-SOURCE SCRIPT

Divergence & Volume Thrust

363
This document provides both user and technical information for the "Divergence & Volume Thrust" (DVT) Pine Script indicator.

Part 1: User Guide
1.1 Introduction
The DVT indicator is an advanced tool designed to automatically identify high-probability trading setups. It works by detecting divergences between price and key momentum oscillators (RSI and MACD).

A divergence is a powerful signal that a trend might be losing strength and a reversal is possible. To filter out weak signals, the DVT indicator includes a Volume Thrust component, which ensures that a divergence is backed by significant market interest before it alerts you.

🐂 Bullish Divergence: Price makes a new low, but the indicator makes a higher low. This suggests selling pressure is weakening.

🐻 Bearish Divergence: Price makes a new high, but the indicator makes a lower high. This suggests buying pressure is weakening.

1.2 Key Features on Your Chart
When you add the indicator to your chart, here's what you will see:

Divergence Lines:

Bullish Lines (Teal): A line will be drawn on your chart connecting two price lows that form a bullish divergence.

Bearish Lines (Red): A line will be drawn connecting two price highs that form a bearish divergence.

Solid lines represent RSI divergences, while dashed lines represent MACD divergences.

Confirmation Labels:

"Bull Div ▲" (Teal Label): This label appears below the candle when a bullish divergence is detected and confirmed by a recent volume spike. This is a high-probability buy signal.

"Bear Div ▼" (Red Label): This label appears above the candle when a bearish divergence is detected and confirmed by a recent volume spike. This is a high-probability sell signal.

Volume Spike Bars (Orange Background):

Any price candle with a faint orange background indicates that the volume during that period was unusually high (exceeding the average volume by a multiplier you can set).

1.3 Settings and Configuration
You can customize the indicator to fit your trading style. Here's what each setting does:

Divergence Pivot Lookback (Left/Right): Controls the sensitivity of swing point detection. Lower numbers find smaller, more frequent divergences. Higher numbers find larger, more significant ones. 5 is a good starting point.

Max Lookback Range for Divergence: How many bars back the script will look for the first part of a divergence pattern. Default is 60.

Indicator Settings (RSI & MACD):

You can toggle RSI and MACD divergences on or off.

Standard length settings for each indicator (e.g., RSI Length 14, MACD 12, 26, 9).

Volume Settings:

Use Volume Confirmation: The most important filter. When checked, labels will only appear if a volume spike occurs near the divergence.

Volume MA Length: The lookback period for calculating average volume.

Volume Spike Multiplier: The core of the "Thrust" filter. A value of 2.0 means volume must be 200% (or 2x) the average to be considered a spike.

Visuals: Customize colors and toggle the confirmation labels on or off.

1.4 Strategy & Best Practices
Confluence is Key: The DVT indicator is powerful, but it should not be used in isolation. Look for its signals at key support and resistance levels, trendlines, or major moving averages for the highest probability setups.

Wait for Confirmation: A confirmed signal (with a label) is much more reliable than an unconfirmed divergence line.

Context Matters: A bullish divergence in a strong downtrend might only lead to a small bounce, not a full reversal. Use the signals in the context of the overall market structure.

Set Alerts: Use the TradingView alert system with this script. Create alerts for "Confirmed Bullish Divergence" and "Confirmed Bearish Divergence" to be notified of setups automatically.

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.