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提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。