OPEN-SOURCE SCRIPT
Divergence Buy/Sell

User Manual: Buy/Sell Divergence v1
-
The Buy/Sell Divergence v1 indicator is a momentum-based analysis tool built upon the Vortex system. Its primary function is to identify discrepancies between price action and trend strength, signaling potential exhaustion points and market reversals (Divergences).
-
-
-
1. Interface Components
- The indicator consists of three main visual elements in the bottom panel:
Dynamic Vortex (Lines):
Green Line (VI+): Represents the strength of the buyers.
Red Line (VI-): Represents the strength of the sellers.
Note: With "Dynamic View" enabled, only the dominant line is shown, removing visual noise and clutter.
Delta Histogram:
Represents the mathematical difference between the two forces. Bars above zero (Lime) indicate a bullish trend; bars below zero (Maroon) indicate a bearish trend.
Background Color:
Green: Confirmed bullish trend.
Red: Confirmed bearish trend.
-
-
-
2. Signal Interpretation
A. BUY DIV (Bullish Divergence)
Occurs during a downtrend and signals a potential bounce or upward reversal.
Price Condition: The price hits a new lower low.
Indicator Condition: The red line (VI-) shows a lower peak of strength compared to its previous peak.
Visual Signal: A green line connects the peaks on the indicator with the label "BUY DIV".
Meaning: Sellers are pushing the price down, but with less conviction. Selling pressure is evaporating.
-
-
-
B. SELL DIV (Bearish Divergence)
Occurs during an uptrend and signals a potential pullback or downward reversal.
Price Condition: The price hits a new higher high.
Indicator Condition: The green line (VI+) shows a lower peak of strength compared to its previous peak.
Visual Signal: A red line connects the peaks on the indicator with the label "SELL DIV".
Meaning: Buyers are driving the price to new highs, but buying momentum is fading. The trend is becoming "exhausted."
-
-
-
3. Parameter Configuration
Parameter Description Suggestion
Length The Vortex calculation period (default: 14). Use 7-10 for Scalping; 14-
21 for Day Trading; 28+ for
Swing Trading.
Pivot Lookback Number of candles needed to confirm a peak Increase this (e.g., 8-10)
(default: 5). for rarer but more
reliable divergence signals.
Dynamic View Hides the weaker trend line. Keep this ON for a clean
and focused chart reading.
-
-
-
4. Strategic Advice & Risk Management
1. Candle Confirmation: Do not enter the trade at the exact moment the label appears. Because divergences are based on "Pivots," the label appears with a delay equal to the Pivot Lookback. Wait for a break of the signal candle's high (for Buy Div) or low (for Sell Div).
2. Trend Filtering: Divergences are most powerful when they occur near historical support or resistance zones on the price chart.
3. Stop Loss Placement:
- For a BUY DIV signal, place the Stop Loss slightly below the recent price low.
- For a SELL DIV signal, place the Stop Loss slightly above the recent price high.
4. Confluence: If you receive a SELL DIV and simultaneously see the histogram shrinking toward the zero line, the probability of a successful trade increases significantly.
-
-
-
The Buy/Sell Divergence v1 indicator is a momentum-based analysis tool built upon the Vortex system. Its primary function is to identify discrepancies between price action and trend strength, signaling potential exhaustion points and market reversals (Divergences).
-
-
-
1. Interface Components
- The indicator consists of three main visual elements in the bottom panel:
Dynamic Vortex (Lines):
Green Line (VI+): Represents the strength of the buyers.
Red Line (VI-): Represents the strength of the sellers.
Note: With "Dynamic View" enabled, only the dominant line is shown, removing visual noise and clutter.
Delta Histogram:
Represents the mathematical difference between the two forces. Bars above zero (Lime) indicate a bullish trend; bars below zero (Maroon) indicate a bearish trend.
Background Color:
Green: Confirmed bullish trend.
Red: Confirmed bearish trend.
-
-
-
2. Signal Interpretation
A. BUY DIV (Bullish Divergence)
Occurs during a downtrend and signals a potential bounce or upward reversal.
Price Condition: The price hits a new lower low.
Indicator Condition: The red line (VI-) shows a lower peak of strength compared to its previous peak.
Visual Signal: A green line connects the peaks on the indicator with the label "BUY DIV".
Meaning: Sellers are pushing the price down, but with less conviction. Selling pressure is evaporating.
-
-
-
B. SELL DIV (Bearish Divergence)
Occurs during an uptrend and signals a potential pullback or downward reversal.
Price Condition: The price hits a new higher high.
Indicator Condition: The green line (VI+) shows a lower peak of strength compared to its previous peak.
Visual Signal: A red line connects the peaks on the indicator with the label "SELL DIV".
Meaning: Buyers are driving the price to new highs, but buying momentum is fading. The trend is becoming "exhausted."
-
-
-
3. Parameter Configuration
Parameter Description Suggestion
Length The Vortex calculation period (default: 14). Use 7-10 for Scalping; 14-
21 for Day Trading; 28+ for
Swing Trading.
Pivot Lookback Number of candles needed to confirm a peak Increase this (e.g., 8-10)
(default: 5). for rarer but more
reliable divergence signals.
Dynamic View Hides the weaker trend line. Keep this ON for a clean
and focused chart reading.
-
-
-
4. Strategic Advice & Risk Management
1. Candle Confirmation: Do not enter the trade at the exact moment the label appears. Because divergences are based on "Pivots," the label appears with a delay equal to the Pivot Lookback. Wait for a break of the signal candle's high (for Buy Div) or low (for Sell Div).
2. Trend Filtering: Divergences are most powerful when they occur near historical support or resistance zones on the price chart.
3. Stop Loss Placement:
- For a BUY DIV signal, place the Stop Loss slightly below the recent price low.
- For a SELL DIV signal, place the Stop Loss slightly above the recent price high.
4. Confluence: If you receive a SELL DIV and simultaneously see the histogram shrinking toward the zero line, the probability of a successful trade increases significantly.
-
-
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.