OPEN-SOURCE SCRIPT

VWAP Divergence | dobofulop

Overview:
This script identifies potential bullish and bearish divergence signals using the Volume Weighted Average Price (VWAP). It calculates VWAP resets based on a selected “Anchor Period” (Session, Week, Month, Quarter, Year, Decade, Century, or corporate events like Earnings, Dividends, Splits). When price action and VWAP move in opposite directions with a sufficiently large ATR-based move over a chosen lookback period, the script plots divergence dots on the chart.


Key Features:
  1. VWAP Anchoring: Choose an anchor period for resetting VWAP. This could be daily, weekly, monthly, or based on specific corporate events (Earnings, Dividends, Splits).
  2. Divergence Detection: Looks for instances where the price is moving up while VWAP moves down (potential bullish divergence), and vice versa for bearish divergence.
  3. ATR Filter: Uses the ATR (Average True Range) to filter out minor or insignificant price moves, helping to reduce noise.
  4. Gap Check: Automatically invalidates signals if large price gaps occur within the lookback range.
  5. Visual Signals: Bullish divergences are plotted below the bar, while bearish divergences are plotted above, making it easy to spot potential reversal zones.



How to Us
  1. Inputs:
    - Anchor Period (Session, Week, Month, etc.) – determines when the VWAP calculation restarts.
    - Source (Default: HLC3) – Price source for the VWAP.
    - ATR Multiplier and Lookback Period – Fine-tune the threshold for detecting significant moves vs. VWAP.

  2. Interpretation:
    - Bullish Divergence Dot: Suggests potential price strength when price moves higher but VWAP moves lower.
    - Bearish Divergence Dot: Suggests potential price weakness when price moves lower but VWAP moves higher.



Disclaimer:

This script is provided for educational purposes only and should not be interpreted as financial advice. Past performance does not guarantee future results. Always conduct your own analysis and consider consulting a financial professional before making trading decisions.
Moving AveragesoscillaltorTrend AnalysisVolume Indicatorvwaposcillator

Skrip open-source

Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menerbitkannya sebagai sumber terbuka, sehingga para trader dapat memahami dan memverifikasinya. Hormat untuk penulisnya! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart

Inggin menggunakan skrip ini pada chart?

Pernyataan Penyangkalan