OPEN-SOURCE SCRIPT

Enhanced MACD + RSI Buy/Sell Signals

### **Enhanced MACD + RSI Buy/Sell Signals Indicator**

This TradingView indicator is designed for **15-minute intraday trading**, providing **stronger and more accurate buy/sell signals** by combining multiple technical indicators: **MACD, RSI, EMA, VWAP, and ATR**.

---

### **Key Components & Logic**

#### **1. MACD (Moving Average Convergence Divergence)**
- Uses **8, 21, 5 MACD settings** (faster than the default 12, 26, 9) for quicker signal detection.
- Buy Signal: **MACD line crosses above the signal line**.
- Sell Signal: **MACD line crosses below the signal line**.

#### **2. RSI (Relative Strength Index)**
- Helps confirm momentum strength.
- Buy only if **RSI is above 30** (prevents buying in weak markets).
- Sell only if **RSI is below 70** (prevents selling too early).

#### **3. 50-Period EMA (Trend Filter)**
- Ensures trades align with the **overall trend**.
- **Buy signals only trigger if price is above the EMA**.
- **Sell signals only trigger if price is below the EMA**.

#### **4. VWAP (Volume Weighted Average Price)**
- Avoids false signals by ensuring price is above/below a volume-based average.
- **Buy only if price is above VWAP** (uptrend confirmation).
- **Sell only if price is below VWAP** (downtrend confirmation).

#### **5. ATR (Average True Range) Filter**
- Ensures trades occur only in **high-volatility conditions**.
- **Buy/Sell signals trigger only when ATR is above a threshold (default: 1.0)**.

---

### **Buy & Sell Signal Conditions**

✅ **Buy Signal (Plotted as Green Arrow Below Price)**
- MACD **bullish crossover** (MACD line crosses above the signal line).
- RSI **above 30** (not in an oversold zone).
- **Price is above the 50 EMA** (strong uptrend).
- **Price is above VWAP** (avoiding false breakouts).
- **ATR is above 1.0** (ensuring enough volatility for a trade).

❌ **Sell Signal (Plotted as Red Arrow Above Price)**
- MACD **bearish crossunder** (MACD line crosses below the signal line).
- RSI **below 70** (not in an overbought zone).
- **Price is below the 50 EMA** (downtrend confirmation).
- **Price is below VWAP** (avoiding weak downtrends).
- **ATR is above 1.0** (ensuring enough movement for profitability).

---

### **Why This Works Well for 15-Minute Charts**
✅ **Faster MACD settings** reduce lag and react quicker to price changes.
✅ **EMA + VWAP** ensures **trend alignment** and prevents false signals.
✅ **ATR filter** removes low-volatility signals, increasing accuracy.
✅ **Simple buy/sell signals** make it easy to read and execute trades.

---

### **How to Use This Indicator**
1. Apply it to a **15-minute** timeframe.
2. Wait for a **green label (BUY)** or **red label (SELL)** on the chart.
3. Confirm signals with **support/resistance levels** for extra reliability.
4. Use a **1:2 risk-reward ratio** for trade exits.

This strategy ensures **higher accuracy, fewer false trades, and stronger trend-based entries**. 🚀

คำจำกัดสิทธิ์ความรับผิดชอบ