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.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。