This Pine Script indicator by Mouiii offers advanced volume analysis tools for traders, dynamically visualizing buy/sell pressure and alerting users to significant volume spikes. The script's color-coded system and customizable thresholds adapt to various trading strategies.
Key Features
1. Dynamic Volume Visualization
- Buy/Sell Volume Intensity: Colors adjust transparency based on relative volume strength (green = buy volume, red = sell volume).
- Buffer System: Prevents overly transparent colors at peak volumes to maintain visibility.
2. Customizable Components
- Color Options: Personalize buy/sell volume colors and high-volume alerts.
- Separate Plots: Distinct buy/sell volume bars clarify market forces.
3. Enhanced Alerts & Reference Tools
- Detailed Alerts: Includes current volume, moving average, and threshold multiplier during spikes.
- Volume Moving Average: Bright reference line improves trend analysis.
How It Works
The script calculates:
- Relative volume strength compared to the period’s maximum.
- Moving average (default 20-period).
- Spike thresholds (user-defined multiplier).
// Example snippet: Volume color intensity calculation
buyColor = color.new(color.green, 80 - (buyVolume / maxVolume * 50))
sellColor = color.new(color.red, 80 - (sellVolume / maxVolume * 50))FAQs
Q: How do I adjust the volume spike threshold?
A: Modify the thresholdMultiplier input (e.g., 2.5 for 250% of average volume).
Q: Can I change the time period for volume analysis?
A: Yes—update the lookbackPeriod variable (default: 200 bars).
Q: Does this work on all timeframes?
A: Yes, but shorter timeframes may require higher thresholds to filter noise.
👉 Explore advanced trading tools
Disclaimer: This script doesn’t guarantee profits. Always test strategies in a risk-controlled environment. TradingView’s Terms of Use apply.