EMA21/55/100/200-v1.3EMA21/55/100/200 Multi-Timeframe Trading Indicator for TradingView
Overview
The EMA21/55/100/200 is a professional-grade TradingView indicator designed for traders who rely on exponential moving averages for trend identification and key level trading. This indicator combines visual clarity with powerful alert functionality, making it suitable for both manual and automated trading strategies.
Key Features
1. Four Exponential Moving Averages
EMA21 (Orange) - Fast moving average for short-term trend detection
EMA55 (Gray) - Medium-term trend filter
EMA100 (Gray) - Long-term trend confirmation
EMA200 (Gray) - Ultimate trend direction indicator
2. Smart Display Management
Lines only appear on the most recent 30 candles - keeps your chart clean and focused
Labels show current EMA values only on the last candle with format "E21: 4720.50"
Historical EMA lines and labels automatically disappear from view
3. Visual Markers (Last 30 Candles Only)
Green upward triangles when price crosses above EMA21
Red downward triangles when price crosses below EMA21
Lime green triangles for EMA21/EMA55 golden cross (bullish)
Fuchsia triangles for EMA21/EMA55 death cross (bearish)
Semi-transparent background highlights when price approaches any EMA (within 0.3%)
4. Comprehensive Alert System
The indicator includes 14 pre-configured alert conditions:
Price Breakout Alerts
Price crosses above/below EMA21
Moving Average Crossovers
EMA21 golden cross / death cross with EMA55
EMA55 golden cross / death cross with EMA200
Key Level Alerts
Price approaches EMA21 (within 0.3%)
Price approaches EMA55 (within 0.3%)
Price approaches EMA100 (within 0.3%)
Price approaches EMA200 (within 0.3%)
Trend Strength Alerts
Price above all four EMAs (strong bullish)
Price below all four EMAs (strong bearish)
Bullish arrangement (EMA21 > EMA55 > EMA100 > EMA200)
Bearish arrangement (EMA21 < EMA55 < EMA100 < EMA200)
Customizable Settings
When you add this indicator to your chart, you can customize the following parameters:
Setting Description Default
EMA21 Color Color of the fast EMA line Orange
EMA55/100/200 Color Color of slower EMA lines Gray
EMA21 Text Color Color of the label text for EMA21 Orange
EMA55/100/200 Text Color Color of label text for other EMAs Gray
Show Background Color Toggle background highlights True
Background Transparency Opacity of background highlights 90
EMA21 Background Color Background color when near EMA21 Orange
EMA55/100/200 Background Color Background color when near other EMAs Gray
How to Use
Installation
Open TradingView Pine Editor
Copy and paste the complete script
Click "Save" and name it "EMA21/55/100/200"
Add to chart
Setting Up Alerts
Right-click on the chart
Select "Add Alert"
Choose your desired condition from the dropdown (e.g., "价格上穿EMA21" for price crossing above EMA21)
Set trigger frequency (once per bar / once per minute)
Configure expiration and notifications
Click "Create"
For Automated Trading (Webhook Setup)
The alerts can be sent to a webhook URL, allowing you to:
Connect to Bitget or other exchange APIs
Automatically execute trades based on EMA crossovers
Receive notifications on your mobile device
Trading Strategies
Strategy 1: Trend Following
Entry: Price crosses above EMA21 + EMA21 above EMA55 (bullish)
Exit: Price crosses below EMA21 or EMA21 crosses below EMA55
Alert: Use "价格上穿EMA21" + check EMA arrangement visually
Strategy 2: Key Level Mean Reversion
Entry: Price approaches EMA21/55/100/200 (background highlight appears)
Confirmation: Wait for reversal candle pattern
Stop Loss: 0.5% - 1% beyond the EMA level
Alert: Use "接近EMA21" (Approaching EMA21)
Strategy 3: Multi-Timeframe Trend Confirmation
Higher timeframe (4H): Check EMA arrangement direction
Lower timeframe (30min): Look for EMA21 crossovers in trend direction
Entry: Both timeframes align with same trend
Complete Script Code
pinescript
//@version=6
indicator(title="EMA21/55/100/200-v1.0", overlay=true)
// ... (full script as provided above)
Technical Specifications
Parameter Value
Platform TradingView
Pine Script Version v5 / v6
Indicator Type Overlay (on price chart)
EMA Periods 21, 55, 100, 200
Display Range Last 30 candles
Alert Conditions 14
Customizable Colors Yes
Advantages
✅ Clean Chart - EMAs only appear on recent candles, reducing visual clutter
✅ Real-time Labels - Current EMA values displayed only on the latest candle
✅ Visual Signals - Triangles and background highlights for quick recognition
✅ Comprehensive Alerts - 14 conditions covering all major trading signals
✅ Fully Customizable - All colors and transparency levels adjustable
✅ Automation Ready - Webhook compatible for API trading integration
Limitations
❌ Requires TradingView paid plan for more than 1 active alert (free plan limited)
❌ Historical EMAs disappear after 30 candles (intended feature, not a bug)
❌ Best used on higher timeframes (30min+) for EMA55/100/200 to be meaningful
Version History
v1.0 - Initial release with EMA21/55/100/200, labels, alerts, and markers
Support
For questions or feature requests, please refer to the Pine Script documentation or TradingView community forums.
Disclaimer: This indicator is for educational and informational purposes only. Past performance does not guarantee future results. Always conduct your own analysis before making trading decisions.
مؤشر Pine Script®






















