OPEN-SOURCE SCRIPT
EMA Position Alert

Description
EMA Position Alert is a comprehensive trend analysis tool designed to help traders instantly identify the market's direction and strength relative to key Exponential Moving Averages (EMAs). By combining visual trend lines with a real-time data dashboard, this indicator provides a clear snapshot of the current price action across short, medium, and long-term horizons.
Whether you are a scalper looking for short-term momentum or a swing trader identifying major trend reversals, this tool simplifies the complex relationship between price and moving averages.
Key Features
1. Multi-EMA System The indicator plots four essential EMAs commonly used by institutional and retail traders:
EMA 21: Short-term trend/momentum.
EMA 55: Medium-term trend.
EMA 100: Major support/resistance level.
EMA 200: Long-term trend filter.
Visual Aid: The EMA lines change transparency automatically. They appear brighter/solid when the price is above them (bullish) and more transparent/faded when the price is below them (bearish).
2. Real-Time Information Dashboard A customizable table (displayed in the top-right corner) provides live data for the current bar:
Status: Clearly indicates if the price is "Above ▲" (Bullish) or "Below ▼" (Bearish) for each specific EMA.
Distance (%): Calculates the percentage distance between the current closing price and each EMA. This is crucial for identifying overextended moves (mean reversion opportunities) or tight consolidation.
Overall Trend Summary:
Strong ★★: Price is above all EMAs (21, 55, 100, 200).
Building ★: Price is above the long-term EMAs (55, 100, 200) but may be testing the short-term trend.
Weak ▼: Price is below all EMAs.
Ranging: Mixed signals (price is sandwiched between EMAs).
3. Custom Alerts Never miss a move. The script comes with built-in alert conditions compatible with TradingView's alert system:
Breakout Alerts: Trigger an alert when price crosses above specific EMAs (21, 55, 100, or 200).
Strong Trend Alert: Trigger an alert when the price successfully holds above all EMAs, signaling a strong bullish phase.
Settings
Show Status Table: Toggle the dashboard on or off.
Table Transparency: Adjust the background opacity of the dashboard to fit your chart theme.
Line Width: Adjust the thickness of the EMA lines for better visibility.
How to Use
Trend Following: Look for the "Strong ★★" status in the dashboard. When the price is above all EMAs and the EMAs are fanning out, it indicates a strong uptrend.
Pullbacks: If the trend is "Strong" but the price drops to test the EMA 21 or EMA 55, look for support bounces.
Mean Reversion: Watch the Distance %. If the distance becomes historically large, the price may be overextended and due for a correction back to the mean.
Consolidation: When the status shows "Ranging" and the Distance % is very low (near 0.00%), a breakout move is likely imminent.
EMA Position Alert is a comprehensive trend analysis tool designed to help traders instantly identify the market's direction and strength relative to key Exponential Moving Averages (EMAs). By combining visual trend lines with a real-time data dashboard, this indicator provides a clear snapshot of the current price action across short, medium, and long-term horizons.
Whether you are a scalper looking for short-term momentum or a swing trader identifying major trend reversals, this tool simplifies the complex relationship between price and moving averages.
Key Features
1. Multi-EMA System The indicator plots four essential EMAs commonly used by institutional and retail traders:
EMA 21: Short-term trend/momentum.
EMA 55: Medium-term trend.
EMA 100: Major support/resistance level.
EMA 200: Long-term trend filter.
Visual Aid: The EMA lines change transparency automatically. They appear brighter/solid when the price is above them (bullish) and more transparent/faded when the price is below them (bearish).
2. Real-Time Information Dashboard A customizable table (displayed in the top-right corner) provides live data for the current bar:
Status: Clearly indicates if the price is "Above ▲" (Bullish) or "Below ▼" (Bearish) for each specific EMA.
Distance (%): Calculates the percentage distance between the current closing price and each EMA. This is crucial for identifying overextended moves (mean reversion opportunities) or tight consolidation.
Overall Trend Summary:
Strong ★★: Price is above all EMAs (21, 55, 100, 200).
Building ★: Price is above the long-term EMAs (55, 100, 200) but may be testing the short-term trend.
Weak ▼: Price is below all EMAs.
Ranging: Mixed signals (price is sandwiched between EMAs).
3. Custom Alerts Never miss a move. The script comes with built-in alert conditions compatible with TradingView's alert system:
Breakout Alerts: Trigger an alert when price crosses above specific EMAs (21, 55, 100, or 200).
Strong Trend Alert: Trigger an alert when the price successfully holds above all EMAs, signaling a strong bullish phase.
Settings
Show Status Table: Toggle the dashboard on or off.
Table Transparency: Adjust the background opacity of the dashboard to fit your chart theme.
Line Width: Adjust the thickness of the EMA lines for better visibility.
How to Use
Trend Following: Look for the "Strong ★★" status in the dashboard. When the price is above all EMAs and the EMAs are fanning out, it indicates a strong uptrend.
Pullbacks: If the trend is "Strong" but the price drops to test the EMA 21 or EMA 55, look for support bounces.
Mean Reversion: Watch the Distance %. If the distance becomes historically large, the price may be overextended and due for a correction back to the mean.
Consolidation: When the status shows "Ranging" and the Distance % is very low (near 0.00%), a breakout move is likely imminent.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน