OPEN-SOURCE SCRIPT
Volume Scanner (Spikes & Drops) [Context]

📌 Purpose
This indicator detects significant volume spikes or drops and optionally filters them by price context (local highs/lows).
It helps identify potential breakout or exhaustion points with improved signal quality compared to raw volume alerts.
🧠 How It Works
1. Volume Spike / Drop Detection
SMA Volume over N bars is calculated as baseline.
Volume Spike: Volume > SMA × Spike Multiplier (default 1.5×).
Volume Drop: Volume < SMA × Drop Multiplier (default 0.5×).
2. Context Filter (optional)
When Use Context = ON:
Bullish Context: Volume spike at/near local price high (last Lookback bars).
Bearish Context: Volume drop at/near local price low (last Lookback bars).
3. Signal Gap
Minimum spacing between signals (Min Gap Bars) prevents excessive clustering.
4. Visuals
Background shading:
Green = Volume Spike in bullish context.
Red = Volume Drop in bearish context.
Alerts can be configured for both conditions.
📈 How to Use
Volume Spikes near highs can indicate breakouts or exhaustion tops.
Volume Drops near lows can signal liquidity dry-up or potential reversals.
Combine with price action or support/resistance for confirmation.
Recommended Timeframes: Works on all timeframes; more reliable on 15m, 1h, 4h.
Markets: Crypto, Forex, Stocks.
⚙️ Inputs
Volume SMA Length
Spike Multiplier / Drop Multiplier
Use Context (High/Low filter)
Min Gap Bars (avoid clustered signals)
⚠️ Disclaimer
This script is for educational purposes only. It does not constitute financial advice.
Always test thoroughly before live trading.
This indicator detects significant volume spikes or drops and optionally filters them by price context (local highs/lows).
It helps identify potential breakout or exhaustion points with improved signal quality compared to raw volume alerts.
🧠 How It Works
1. Volume Spike / Drop Detection
SMA Volume over N bars is calculated as baseline.
Volume Spike: Volume > SMA × Spike Multiplier (default 1.5×).
Volume Drop: Volume < SMA × Drop Multiplier (default 0.5×).
2. Context Filter (optional)
When Use Context = ON:
Bullish Context: Volume spike at/near local price high (last Lookback bars).
Bearish Context: Volume drop at/near local price low (last Lookback bars).
3. Signal Gap
Minimum spacing between signals (Min Gap Bars) prevents excessive clustering.
4. Visuals
Background shading:
Green = Volume Spike in bullish context.
Red = Volume Drop in bearish context.
Alerts can be configured for both conditions.
📈 How to Use
Volume Spikes near highs can indicate breakouts or exhaustion tops.
Volume Drops near lows can signal liquidity dry-up or potential reversals.
Combine with price action or support/resistance for confirmation.
Recommended Timeframes: Works on all timeframes; more reliable on 15m, 1h, 4h.
Markets: Crypto, Forex, Stocks.
⚙️ Inputs
Volume SMA Length
Spike Multiplier / Drop Multiplier
Use Context (High/Low filter)
Min Gap Bars (avoid clustered signals)
⚠️ Disclaimer
This script is for educational purposes only. It does not constitute financial advice.
Always test thoroughly before live trading.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.