MACD Colored CandlesMACD Histogram Candle Colors
Overview
This indicator visualizes MACD momentum directly on your candlesticks by coloring them according to the MACD histogram's state. Instead of looking at a separate MACD panel, you can instantly see momentum changes right on your price chart.
How It Works
The indicator calculates the standard MACD (Moving Average Convergence Divergence) and applies the histogram's color logic directly to your candles:
🟢 **Teal (#26a69a)** - Bullish momentum increasing (histogram positive and rising)
🟢 **Light Teal (#b2dfdb)** - Bullish momentum weakening (histogram positive but falling)
🔴 **Light Red (#ffcdd2)** - Bearish momentum weakening (histogram negative but rising)
🔴 **Red (#ff5252)** - Bearish momentum increasing (histogram negative and falling)
Features
- **Pure MACD Logic**: Uses exact MACD histogram color calculations
- **Clean Chart**: No additional plots or tables cluttering your view
- **Customizable Inputs**: Adjust Fast length (default 12), Slow length (default 26), and Signal length (default 9)
- **MA Type Selection**: Choose between EMA or SMA for both oscillator and signal calculations
- **Overlay Display**: Works seamlessly with other indicators
Settings
- **Source**: Price source for MACD calculation (default: close)
- **Fast Length**: Period for fast moving average (default: 12)
- **Slow Length**: Period for slow moving average (default: 26)
- **Signal Length**: Period for signal line (default: 9)
- **Oscillator MA Type**: EMA or SMA
- **Signal MA Type**: EMA or SMA
Best Use Cases
- Quick momentum identification without switching between panels
- Combining with support/resistance levels for trade entries
- Identifying divergences between price action and momentum
- Multi-timeframe analysis with color-coded momentum
Tips
- Use in combination with traditional MACD for confirmation
- Color changes often precede significant price movements
- Works on all timeframes and instruments
- Consider pairing with volume indicators for stronger signals
Credits
Based on the standard MACD indicator with histogram color visualization applied to candlesticks.
---
*This is an open-source script. Feel free to use, modify, and share!*
Pine Script®指標






















