PROTECTED SOURCE SCRIPT

Mann EMA 50

85
Here’s a **clean, professional description** you can paste directly into **TradingView → Publish → Description**.
It matches **exactly** how your indicator works now.

---

## 📌 EMA50 Retest + Break Opposite Candle (Structure-Based Entry)

This indicator is designed to capture **high-probability continuation entries** using **EMA50**, **retests**, and **market structure**.
It avoids over-trading by waiting for a **valid retest** and a **confirmed break of structure** before giving an entry signal.

---

## 🔹 Core Concept

The indicator works in **two phases**:

1. **Retest Confirmation**
2. **Break of the Opposite Candle (Structure Break)**

Entries are only generated **after the EMA50 is retested**.

---

## 🟢 BUY Logic

1. Price must be **above EMA50**
2. While price stays above EMA:

* The indicator tracks the **most recent RED candle**
3. Price must **touch EMA50** (wick or body = valid retest)

* If the retest candle itself is red, it is used
4. After the retest:

* A **BUY signal appears when price breaks the HIGH of the most recent RED candle that occurred before (or at) the retest**
5. **Stop Loss**

* Placed at the **low of that red trigger candle**

➡️ Entry is **always AFTER the retest**, never before.

---

## 🔴 SELL Logic (Mirror of Buy)

1. Price must be **below EMA50**
2. While price stays below EMA:

* The indicator tracks the **most recent GREEN candle**
3. Price must **touch EMA50** (wick or body)

* If the retest candle itself is green, it is used
4. After the retest:

* A **SELL signal appears when price breaks the LOW of the most recent GREEN candle that occurred before (or at) the retest**
5. **Stop Loss**

* Placed at the **high of that green trigger candle**

---

## 📈 Visual Elements

* **EMA50** plotted on chart
* **Black horizontal line** → Entry trigger level
* **Red horizontal line** → Stop-loss level
* **Small triangle arrows**:

* ▲ Green = BUY
* ▼ Red = SELL
(No large labels or boxes for a clean chart)

---

## ⚙️ Settings

* **EMA Length** – Default 50 (can be adjusted)
* **Expire Setup After Retest (bars)**
Cancels the setup if price doesn’t break the trigger within the selected number of candles
* **Require candle CLOSE beyond trigger**

* ON → Conservative (close confirmation)
* OFF → Aggressive (wick break allowed)

---

## 🎯 Best Use Case

* Trending markets
* Pullback / continuation strategies
* Works well on **M15, H1, H4**
* Forex, Indices, Crypto, Gold (XAUUSD)

---

## ⚠️ Notes

* No signal will appear if:

* EMA is not retested
* No opposite candle exists before the retest
* This is intentional to **filter low-quality setups**

---

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

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน