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.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.