OPEN-SOURCE SCRIPT
MACD Colored Candles

MACD 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:
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!*
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!*
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.