OPEN-SOURCE SCRIPT
VPCI & AVSL - Volume Analysis

Description:
This indicator implements two volume-analysis techniques from Buff Dormeier's book "Investing with Volume Analysis" (FT Press, 2011, chapter 17):
1. VPCI (Volume Price Confirmation Indicator) — measures whether volume is CONFIRMING or CONTRADICTING the current price trend, plotted as a histogram in its own panel, with a smoothed line and adjustable alert thresholds.
2. AVSL (Anti-Volume Stop Loss) — a stop-loss/support-resistance zone that adapts to each instrument's own volatility and volume, plotted directly on the price chart (works on any market: forex, gold, crypto, stocks).
V-bottom / V-top pattern: the indicator also plots a Bollinger Band around the VPCI line itself and flags the specific pattern the book describes as its strongest signal — VPCI diving below the lower band and then crossing back above it (a "V-bottom"), which the author uses to mark intermediate-term lows. A symmetric "V-top" case (VPCI spiking above the upper band then crossing back below) is the script author's own extension for the opposite side, not something explicitly described in the book. Both are marked on the chart with shapes and have dedicated alerts.
All formulas were re-implemented from scratch in Pine Script — no code was copied from any other public script. Toggle "Show summary table only" in settings to hide all plots and keep just a compact 5-row status table (VPCI value, status, AVSL buy/sell levels, latest V-pattern).
This script is for educational purposes only and does not constitute financial advice. Always combine with your own risk management.
This indicator implements two volume-analysis techniques from Buff Dormeier's book "Investing with Volume Analysis" (FT Press, 2011, chapter 17):
1. VPCI (Volume Price Confirmation Indicator) — measures whether volume is CONFIRMING or CONTRADICTING the current price trend, plotted as a histogram in its own panel, with a smoothed line and adjustable alert thresholds.
2. AVSL (Anti-Volume Stop Loss) — a stop-loss/support-resistance zone that adapts to each instrument's own volatility and volume, plotted directly on the price chart (works on any market: forex, gold, crypto, stocks).
V-bottom / V-top pattern: the indicator also plots a Bollinger Band around the VPCI line itself and flags the specific pattern the book describes as its strongest signal — VPCI diving below the lower band and then crossing back above it (a "V-bottom"), which the author uses to mark intermediate-term lows. A symmetric "V-top" case (VPCI spiking above the upper band then crossing back below) is the script author's own extension for the opposite side, not something explicitly described in the book. Both are marked on the chart with shapes and have dedicated alerts.
All formulas were re-implemented from scratch in Pine Script — no code was copied from any other public script. Toggle "Show summary table only" in settings to hide all plots and keep just a compact 5-row status table (VPCI value, status, AVSL buy/sell levels, latest V-pattern).
This script is for educational purposes only and does not constitute financial advice. Always combine with your own risk management.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.