OPEN-SOURCE SCRIPT
Volume Divergence Scanner

Overview
The indicator combines two independent signal types: Volume Spike (abnormal volume with RSI confirmation) and Divergence (RSI divergence near price extremes). Both must align within a time window to produce a BUY or SELL signal.
Settings
General
Min Bars Between BUY - Minimum bars between any two BUY signals
Min Bars Between SELL - Minimum bars between any two SELL signals
Volume Spike
Enable Volume Spike Signals - Toggle the volume spike component on/off
RSI Length - Period for RSI calculation
Volume MA Length - Short-term volume moving average period
Volume MA Long Length - Long-term volume moving average period (baseline for spike detection)
Buy Multiplier - Volume must exceed long MA by this factor to trigger a buy spike
Sell Multiplier - Volume must exceed long MA by this factor to trigger a sell spike
RSI Buy Level - RSI must be below this level for a buy spike to fire
RSI Sell Level - RSI must be above this level for a sell spike to fire
Min Bars Between BUY - Minimum bars between volume spike buy signals
Min Bars Between SELL - Minimum bars between volume spike sell signals
Divergence
Enable Divergence - Toggle the divergence component on/off
Lookback Bars - Window for detecting local price and RSI extremes
RSI Buy Level - RSI must be below this level for a divergence buy
RSI Sell Level - RSI must be above this level for a divergence sell
Buy Proximity to Low - Price must be within this multiplier of the local low (e.g. 1.02 = within 2%)
Sell Proximity to High - Price must be within this multiplier of the local high (e.g. 0.98 = within 2%)
Min Bars Between BUY - Minimum bars between divergence buy signals
Min Bars Between SELL - Minimum bars between divergence sell signals
VOL+D Confirmation Window - Maximum bars allowed between a Volume Spike and Divergence signal for them to confirm each other
Alerts
Alert: BUY - Enable Trading View alert on BUY signal
Alert: SELL - Enable TradingView alert on SELL signal
Signal Logic
When both components are enabled a BUY fires when either:
A SELL fires by the same logic in reverse.
Tuning Tips
Too few signals:
Too many signals:
Adapting to different assets or timeframes:
The indicator combines two independent signal types: Volume Spike (abnormal volume with RSI confirmation) and Divergence (RSI divergence near price extremes). Both must align within a time window to produce a BUY or SELL signal.
Settings
General
Min Bars Between BUY - Minimum bars between any two BUY signals
Min Bars Between SELL - Minimum bars between any two SELL signals
Volume Spike
Enable Volume Spike Signals - Toggle the volume spike component on/off
RSI Length - Period for RSI calculation
Volume MA Length - Short-term volume moving average period
Volume MA Long Length - Long-term volume moving average period (baseline for spike detection)
Buy Multiplier - Volume must exceed long MA by this factor to trigger a buy spike
Sell Multiplier - Volume must exceed long MA by this factor to trigger a sell spike
RSI Buy Level - RSI must be below this level for a buy spike to fire
RSI Sell Level - RSI must be above this level for a sell spike to fire
Min Bars Between BUY - Minimum bars between volume spike buy signals
Min Bars Between SELL - Minimum bars between volume spike sell signals
Divergence
Enable Divergence - Toggle the divergence component on/off
Lookback Bars - Window for detecting local price and RSI extremes
RSI Buy Level - RSI must be below this level for a divergence buy
RSI Sell Level - RSI must be above this level for a divergence sell
Buy Proximity to Low - Price must be within this multiplier of the local low (e.g. 1.02 = within 2%)
Sell Proximity to High - Price must be within this multiplier of the local high (e.g. 0.98 = within 2%)
Min Bars Between BUY - Minimum bars between divergence buy signals
Min Bars Between SELL - Minimum bars between divergence sell signals
VOL+D Confirmation Window - Maximum bars allowed between a Volume Spike and Divergence signal for them to confirm each other
Alerts
Alert: BUY - Enable Trading View alert on BUY signal
Alert: SELL - Enable TradingView alert on SELL signal
Signal Logic
When both components are enabled a BUY fires when either:
- Volume Spike BUY occurred and a Divergence BUY happened within the last confirmWindow bars
- Divergence BUY occurred and a Volume Spike BUY happened within the last confirmWindow bars
A SELL fires by the same logic in reverse.
- When only Volume Spike is enabled, signals fire on volume spikes alone, without divergence confirmation.
- When only Divergence is enabled, signals fire on RSI divergence alone, without volume confirmation.
Tuning Tips
Too few signals:
- Increase VOL+D Confirmation Window
- Lower Buy Multiplier / Sell Multiplier
- Widen Buy Proximity to Low (e.g. 1.05) and Sell Proximity to High (e.g. 0.95)
- Disable one component to see which fires more frequently
Too many signals:
- Increase Min Bars Between BUY/SELL
- Raise Buy Multiplier / Sell Multiplier
- Tighten Buy Proximity to Low (e.g. 1.01) and Sell Proximity to High (e.g. 0.99)
- Decrease VOL+D Confirmation Window
Adapting to different assets or timeframes:
- Higher timeframes (4h, 1D) generally need higher multipliers and longer MA periods
- More volatile assets may need looser RSI levels and proximity values
- Start with default settings and adjust one parameter at a time
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
VMS://RACCOON — Cutting through the noise.
Telegram: t.me/vms_raccoon
X: x.com/vms_raccoon
Not financial advice
Telegram: t.me/vms_raccoon
X: x.com/vms_raccoon
Not financial advice
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
VMS://RACCOON — Cutting through the noise.
Telegram: t.me/vms_raccoon
X: x.com/vms_raccoon
Not financial advice
Telegram: t.me/vms_raccoon
X: x.com/vms_raccoon
Not financial advice
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.