OPEN-SOURCE SCRIPT

20, 50, 200 MA Crossover

### **Description of the 20, 50, 200 MA Crossover Script**

This script is a custom **Moving Average (MA) crossover indicator** designed for TradingView. It uses three moving averages: **20-day**, **50-day**, and **200-day**, and generates **Buy** and **Sell signals** based on specific crossover conditions.

#### **Features:**
1. **Moving Averages:**
- **20 MA (Short-Term):** Tracks short-term price trends (green line).
- **50 MA (Mid-Term):** Tracks medium-term trends (orange line).
- **200 MA (Long-Term):** Tracks long-term trends (blue line).

2. **Buy Signal:**
- Triggered when the **20 MA crosses above the 50 MA**, and the **50 MA is above the 200 MA**.
- Indicates a potential bullish trend.

3. **Sell Signal:**
- Triggered when the **20 MA crosses below the 50 MA**, and the **50 MA is below the 200 MA**.
- Indicates a potential bearish trend.

4. **Buy/Sell Labels:**
- Displays "Buy" and "Sell" labels directly on the chart at crossover points.

5. **Alerts:**
- Alerts can be enabled to notify you of Buy or Sell signals.

---

### **Use Cases:**
- Helps traders identify short-term and long-term trends.
- Useful for swing trading, day trading, or identifying key market movements.
- Provides visual and actionable signals directly on the chart.

This script is ideal for traders who want to automate trend detection using the popular 20, 50, and 200 moving averages. 🚀
buyCandlestick analysisChart patternsCyclesSELL

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer