OPEN-SOURCE SCRIPT
EMA 200 Distance ATR Normalized Oscillator

# 📊 EMA 200 Distance Oscillator
## What Does This Indicator Do?
This oscillator measures how far the price is from the **EMA 200** (Exponential Moving Average) and transforms it into a **normalized 0-100 scale** using mathematical sigmoid function.
### Core Formula
```
1. Calculate: Price - EMA(200)
2. Normalize: (Price - EMA) / ATR
3. Transform: Sigmoid(normalized_value) × 100
```
The sigmoid function smoothly maps any distance into a readable 0-100 range, making it easy to spot trends and extremes.
---
## 📈 Key Levels
- **50** = Neutral (price at EMA 200)
- **> 50** = Price above EMA (bullish territory)
- **< 50** = Price below EMA (bearish territory)
- **> 80** = Overbought zone
- **< 20** = Oversold zone
---
## 🎯 Trading Philosophy: Stay With The Trend
**The most important principle in trading is to stay with the trend.**
This oscillator helps you:
✅ **Identify the dominant trend** (above or below 50)
✅ **Avoid counter-trend trades** (don't fight the momentum)
✅ **Spot trend exhaustion** (overbought/oversold zones)
✅ **Time your entries** (wait for pullbacks in strong trends)
### Remember:
- Values consistently above 50 = **Stay bullish**
- Values consistently below 50 = **Stay bearish**
- Don't try to catch falling knives or short strong uptrends
- **The trend is your friend until it ends**
---
## 🎨 Visual Features
- **Color gradient line**: Transitions from red (0) to green (100)
- **Histogram bars**: Shows deviation from neutral (50)
- **Background zones**: Highlights overbought/oversold areas
- **Signal triangles**: Marks trend changes at 50 level
- **Live info table**: Displays real-time metrics with vibrant colors
---
## ⚙️ Customizable Parameters
- **EMA Length** (default: 200)
- **ATR Length** (default: 14)
- **Sigmoid Multiplier** (default: 1.0) - Controls sensitivity
---
## 🔔 Built-in Alerts
- Bullish signal (crosses above 50)
- Bearish signal (crosses below 50)
- Overbought alert (enters > 80)
- Oversold alert (enters < 20)
---
## ⚠️ Disclaimer
**This indicator is for educational and informational purposes only.**
- Not financial advice
- Past performance does not guarantee future results
- Always use proper risk management
- Combine with other analysis methods
- Trade at your own risk
---
## 💬 Feedback Welcome
If you found this indicator helpful, I'd appreciate:
- A **follow** to see more trading tools
- Your **comments** and suggestions for improvement
- Sharing your experience using it
Your feedback helps me create better indicators for the community!
---
**Happy Trading & Stay With The Trend! 📈**
## What Does This Indicator Do?
This oscillator measures how far the price is from the **EMA 200** (Exponential Moving Average) and transforms it into a **normalized 0-100 scale** using mathematical sigmoid function.
### Core Formula
```
1. Calculate: Price - EMA(200)
2. Normalize: (Price - EMA) / ATR
3. Transform: Sigmoid(normalized_value) × 100
```
The sigmoid function smoothly maps any distance into a readable 0-100 range, making it easy to spot trends and extremes.
---
## 📈 Key Levels
- **50** = Neutral (price at EMA 200)
- **> 50** = Price above EMA (bullish territory)
- **< 50** = Price below EMA (bearish territory)
- **> 80** = Overbought zone
- **< 20** = Oversold zone
---
## 🎯 Trading Philosophy: Stay With The Trend
**The most important principle in trading is to stay with the trend.**
This oscillator helps you:
✅ **Identify the dominant trend** (above or below 50)
✅ **Avoid counter-trend trades** (don't fight the momentum)
✅ **Spot trend exhaustion** (overbought/oversold zones)
✅ **Time your entries** (wait for pullbacks in strong trends)
### Remember:
- Values consistently above 50 = **Stay bullish**
- Values consistently below 50 = **Stay bearish**
- Don't try to catch falling knives or short strong uptrends
- **The trend is your friend until it ends**
---
## 🎨 Visual Features
- **Color gradient line**: Transitions from red (0) to green (100)
- **Histogram bars**: Shows deviation from neutral (50)
- **Background zones**: Highlights overbought/oversold areas
- **Signal triangles**: Marks trend changes at 50 level
- **Live info table**: Displays real-time metrics with vibrant colors
---
## ⚙️ Customizable Parameters
- **EMA Length** (default: 200)
- **ATR Length** (default: 14)
- **Sigmoid Multiplier** (default: 1.0) - Controls sensitivity
---
## 🔔 Built-in Alerts
- Bullish signal (crosses above 50)
- Bearish signal (crosses below 50)
- Overbought alert (enters > 80)
- Oversold alert (enters < 20)
---
## ⚠️ Disclaimer
**This indicator is for educational and informational purposes only.**
- Not financial advice
- Past performance does not guarantee future results
- Always use proper risk management
- Combine with other analysis methods
- Trade at your own risk
---
## 💬 Feedback Welcome
If you found this indicator helpful, I'd appreciate:
- A **follow** to see more trading tools
- Your **comments** and suggestions for improvement
- Sharing your experience using it
Your feedback helps me create better indicators for the community!
---
**Happy Trading & Stay With The Trend! 📈**
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน