Volume Color Bars with SMA MACD & Linear Regression
Aug 16, 2020

The Volume Color Bars with SMA MACD & Linear Regression indicator enhances volume analysis by providing a color-coded visualization based on moving averages and historical extremes, helping traders identify significant volume shifts at a glance.
Usage
The tool colors volume bars to reflect their relationship with the Simple Moving Average (SMA) and local high-volume peaks. By default, the bars follow these rules:
- Green: Volume is higher than the Simple Moving Average.
- Red: Volume is lower than the Simple Moving Average.
- Contrast Color (Black/White): Volume has reached a new high relative to the specified lookback period (Max Count).
Traders can use these visual cues to confirm the strength of a price move. High volume (green) confirms momentum, while a "Max Volume" bar (contrast color) often signifies a climax or significant institutional interest.
Details
The script integrates several technical overlays to provide a comprehensive view of volume dynamics:
- Volume SMA: A standard moving average applied to volume to establish a baseline.
- Volume MACD: Calculates the Moving Average Convergence Divergence of volume, helping to identify shifts in volume momentum.
- Linear Regression: Draws a regression line on the volume data to visualize the current trend of participation.
- Climax Detection: By comparing current volume to the highest volume over a defined lookback, the script identifies "exhaustion" or "breakout" volume levels.
Settings
Core Settings
- MA Count: Sets the length for the volume Simple Moving Average.
- Max Volume special color: Enables or disables the unique coloring for volume spikes.
- Lookback Count for Max Volume: The period used to determine if the current volume is a local maximum.
MACD & Regression
- MACD Slow/Fast/Signal: Parameters for calculating the Volume MACD components.
- Linear Regression Candle 1: The starting point for the regression calculation.
- No. of candles for regression: The period used for the linear regression calculation.
- Draw Linear Regression Line: Toggles the visual regression line on the chart.
FAQ
How do I use the volume color signals for trading?
Generally, green bars indicate increasing participation, while red bars show declining interest. A contrast-colored bar often signals a potential reversal or a strong breakout due to extreme volume.
Can I change the colors of the bars?
The colors are determined by the script's logic based on your theme settings, but the conditions for the colors can be adjusted via the "Max Volume" and "MA Count" inputs.
How can I access Volume Color Bars with SMA MACD & Linear Regression?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.