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 de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.