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!*
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。