OPEN-SOURCE SCRIPT
Price–Volume Anomaly Detector

Description
This indicator identifies unusual relationships between price strength and trading volume. By analyzing expected intraday volume behavior and comparing it with current activity, it highlights potential exhaustion, absorption, or expansion events that may signal changing market dynamics.
How It Works
The script profiles average volume by time of day and compares current volume against this adaptive baseline. Combined with normalized price movement (ATR-based), it detects conditions where price and volume diverge:
Key Features
Inputs Overview
How to Use:
How It Helps
⚠️Disclaimer:
This script is provided for educational and informational purposes only. It is not financial advice and should not be considered a recommendation to buy, sell, or hold any financial instrument. Trading involves significant risk of loss and is not suitable for every investor. Users should perform their own due diligence and consult with a licensed financial advisor before making any trading decisions. The author does not guarantee any profits or results from using this script, and assumes no liability for any losses incurred. Use this script at your own risk.
This indicator identifies unusual relationships between price strength and trading volume. By analyzing expected intraday volume behavior and comparing it with current activity, it highlights potential exhaustion, absorption, or expansion events that may signal changing market dynamics.
How It Works
The script profiles average volume by time of day and compares current volume against this adaptive baseline. Combined with normalized price movement (ATR-based), it detects conditions where price and volume diverge:
- Exhaustion: Strong price move on low volume (potential fade)
- Absorption: Weak price move on high volume (potential reversal)
- Expansion: Strong price move on high volume (momentum continuation)
Key Features
- Adaptive time-based volume normalization
- Configurable sensitivity thresholds
- Optional visibility for each anomaly type
- Adjustable label transparency and offset
- Light Mode support: label text automatically adjusts for dark or light chart backgrounds
- Lightweight overlay design
Inputs Overview
- Volume Profile Resolution: Defines time bucket size for expected volume
[*]Lookback Days: Controls how quickly the profile adapts - Price / Volume Thresholds: Tune anomaly sensitivity
- Show Expansion / Exhaustion / Absorption: Toggle specific labels
- Label Transparency & Offset: Adjust chart visibility
How to Use:
- Apply the indicator to any chart or timeframe.
- Observe where labels appear:
🔴 Exhaustion: strong price, weak volume
🔵 Absorption: weak price, strong volume
🟢 Expansion: strong price, strong volume - Use these as context clues, not trade signals — combine with broader volume or trend analysis.
How It Helps
- Reveals hidden price–volume imbalances
- Highlights areas where momentum may be fading or strengthening
- Enhances understanding of market behavior beyond raw price action
⚠️Disclaimer:
This script is provided for educational and informational purposes only. It is not financial advice and should not be considered a recommendation to buy, sell, or hold any financial instrument. Trading involves significant risk of loss and is not suitable for every investor. Users should perform their own due diligence and consult with a licensed financial advisor before making any trading decisions. The author does not guarantee any profits or results from using this script, and assumes no liability for any losses incurred. Use this script at your own risk.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.