OPEN-SOURCE SCRIPT

Dynamic Volume-Based Buy/Sell Indicator

Updated
This script provides a powerful volume-based indicator that visualizes buy and sell volumes, issues alerts for volume spikes, and adjusts color intensity dynamically based on volume size. It includes customizable settings for volume averaging and thresholds, making it adaptable to various trading strategies.
Release Notes
1. Buffer for Intensity Calculation: To prevent overly transparent color coding when volume is near the maximum, a buffer has been added. This ensures that even high-volume bars remain visible, maintaining clarity in volume-based color intensity.
2. Customizable Color Options: Users can now customize the colors for buy volume, sell volume, and the high-volume warning highlight. This allows traders to personalize the script’s visual cues to their preferences.
3. Separate Buy and Sell Volume Plots: Instead of combining buy and sell volumes into a single plot, these are now shown separately. This offers more detailed insights into market activity, clearly distinguishing between buying and selling forces.
4. Enhanced Alert Messages: The alert system has been improved to provide more detailed information, including the current volume, average volume, and the threshold multiplier at the time of the alert. This gives traders more context when significant volume spikes occur.
5. Bug Fixes and Syntax Adjustments: The alert message has been adjusted to avoid line continuation errors, ensuring that the script compiles correctly without issues.
Release Notes
Minor alert update
Release Notes
This Pine Script is designed to visualize the intensity of buying and selling volume based on dynamic color shading. It adjusts the color transparency of volume bars to reflect the relative volume strength, with green indicating buying volume and red indicating selling volume. The intensity of the colors increases with higher volume levels compared to the maximum volume over a specified period. The script also plots the moving average of the volume for reference and highlights volume spikes that exceed a customizable threshold, triggering an alert when such spikes occur.
Release Notes
Changed to a more bright color for Average volume
Advance/Decline Volume LineMoving Average Convergence / Divergence (MACD)Simple Moving Average (SMA)

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer