OPEN-SOURCE SCRIPT
Volume Anomaly Detector

Volume Anomaly Detector
A standalone volume-panel indicator designed to flag unusually high volume relative to recent average activity.
Core Logic
Automatically calculates a "weekly average volume" baseline, with built-in auto-detection of how many bars occur per day and per week across different symbols/timeframes — so the baseline stays meaningful when you switch instruments or chart intervals, with no manual reconfiguration needed
When real-time volume exceeds a configurable multiple of the average, it's flagged as abnormal volume, with color-coding to distinguish anomalies (red) from normal activity (light yellow)
Visual Output
Displays the volume histogram, weekly average volume line, and the anomaly threshold line together, making it easy to see where current volume stands relative to its recent baseline at a glance
Usage Notes: Useful for identifying moments where price movement may be backed by significant capital flow. It's recommended to combine this with price structure or other indicators for confirmation — abnormal volume alone does not indicate direction, and should be interpreted alongside the bar's closing position or subsequent price reaction.
Disclaimer: This indicator's output is based purely on statistical analysis of historical volume data. It does not constitute trading advice, and past performance does not guarantee future results. Please assess your own risk and trade responsibly.
A standalone volume-panel indicator designed to flag unusually high volume relative to recent average activity.
Core Logic
Automatically calculates a "weekly average volume" baseline, with built-in auto-detection of how many bars occur per day and per week across different symbols/timeframes — so the baseline stays meaningful when you switch instruments or chart intervals, with no manual reconfiguration needed
When real-time volume exceeds a configurable multiple of the average, it's flagged as abnormal volume, with color-coding to distinguish anomalies (red) from normal activity (light yellow)
Visual Output
Displays the volume histogram, weekly average volume line, and the anomaly threshold line together, making it easy to see where current volume stands relative to its recent baseline at a glance
Usage Notes: Useful for identifying moments where price movement may be backed by significant capital flow. It's recommended to combine this with price structure or other indicators for confirmation — abnormal volume alone does not indicate direction, and should be interpreted alongside the bar's closing position or subsequent price reaction.
Disclaimer: This indicator's output is based purely on statistical analysis of historical volume data. It does not constitute trading advice, and past performance does not guarantee future results. Please assess your own risk and trade responsibly.
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.