OPEN-SOURCE SCRIPT
Mis à jour EMA Candle Color

EMA Candle Color - Visual EMA-Based Candle Coloring System
Overview:
This indicator provides a visual approach to trend identification by coloring candles based on their relationship with an Exponential Moving Average (EMA). The script dynamically colors both the candle bars and plots custom candles to give traders an immediate visual representation of price momentum relative to the EMA.
How It Works:
The indicator calculates an EMA based on your chosen source (default: open price) and length (default: 10 periods). It then applies a simple yet effective rule:
This instant visual feedback helps traders quickly identify:
Key Features:
How to Use:
1. Add the indicator to your chart
2. Adjust the EMA Length based on your trading timeframe:
- Shorter periods (5-20) for day trading and scalping
- Medium periods (20-50) for swing trading
- Longer periods (50-200) for position trading
3. Watch for candle color changes as potential entry/exit signals
4. Combine with other indicators for confirmation
Trading Applications:
Settings:
Technical Details:
The script uses Pine Script v6 and employs the standard ta.ema() function for smooth, responsive EMA calculations. The candle coloring is achieved through both barcolor() and plotcandle() functions, ensuring visibility across different chart settings.
Note:
This indicator works on all timeframes and instruments. For best results, combine with proper risk management and additional confirmation indicators. The EMA Candle Color system is designed to simplify trend identification, not as a standalone trading system.
Tips:
This script is open-source. Feel free to use it as a foundation for your own trading system or modify it to suit your specific trading style.
Overview:
This indicator provides a visual approach to trend identification by coloring candles based on their relationship with an Exponential Moving Average (EMA). The script dynamically colors both the candle bars and plots custom candles to give traders an immediate visual representation of price momentum relative to the EMA.
How It Works:
The indicator calculates an EMA based on your chosen source (default: open price) and length (default: 10 periods). It then applies a simple yet effective rule:
- When the source price is ABOVE the EMA → Candles turn GREEN (bullish)
- When the source price is BELOW the EMA → Candles turn RED (bearish)
This instant visual feedback helps traders quickly identify:
- Current trend direction
- Potential support/resistance levels (the EMA line itself)
- Momentum shifts when candles change color
Key Features:
- Customizable EMA Parameters: Adjust the EMA length (1-500) and source (open, close, high, low, hl2, hlc3, ohlc4)
- Custom Color Selection: Choose your preferred bullish and bearish colors to match your chart theme
- Dual Visualization: Both bar coloring and custom plotcandle for enhanced visibility
- Offset Capability: Shift the EMA line forward or backward for advanced analysis
- Clean Design: Minimal overlay that doesn't clutter your chart
How to Use:
1. Add the indicator to your chart
2. Adjust the EMA Length based on your trading timeframe:
- Shorter periods (5-20) for day trading and scalping
- Medium periods (20-50) for swing trading
- Longer periods (50-200) for position trading
3. Watch for candle color changes as potential entry/exit signals
4. Combine with other indicators for confirmation
Trading Applications:
- Trend Following: Stay in trades while candles remain the same color
- Reversal Signals: Watch for color changes as early reversal warnings
- Filter System: Only take long positions during green candles, shorts during red
- Visual Clarity: Quickly assess market sentiment at a glance
Settings:
- Length: EMA calculation period (default: 10)
- Source: Price data used for EMA calculation (default: open)
- Offset: Shift EMA line on chart (default: 0)
- Bullish Color: Color for candles above EMA (default: green)
- Bearish Color: Color for candles below EMA (default: red)
Technical Details:
The script uses Pine Script v6 and employs the standard ta.ema() function for smooth, responsive EMA calculations. The candle coloring is achieved through both barcolor() and plotcandle() functions, ensuring visibility across different chart settings.
Note:
This indicator works on all timeframes and instruments. For best results, combine with proper risk management and additional confirmation indicators. The EMA Candle Color system is designed to simplify trend identification, not as a standalone trading system.
Tips:
- Use on higher timeframes for more reliable signals
- Combine with volume analysis for confirmation
- Consider using multiple EMA periods for confluence
- Disable default candles if using the plotcandle feature to avoid overlap
This script is open-source. Feel free to use it as a foundation for your own trading system or modify it to suit your specific trading style.
Notes de version
Add triangle plot to indicatorScript open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Aga Tarigan
t.me/AT777mind
t.me/AT777mind
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Aga Tarigan
t.me/AT777mind
t.me/AT777mind
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.