PROTECTED SOURCE SCRIPT

Trend Warning / Direction (EMA20/50)

15
This indicator visualizes trend changes and consolidation phases using the 20 EMA and 50 EMA.

🔹 Trend Signals
• Green triangle (▲): EMA 20 crosses above EMA 50 → bullish trend signal
• Red triangle (▼): EMA 20 crosses below EMA 50 → bearish trend signal
• Crosses are confirmed on candle close to avoid false signals.

🔹 EMA Distance Warning

The indicator highlights low-momentum / squeeze zones when the distance between EMA 20 and EMA 50 falls below a configurable threshold.
• Yellow triangle with number:
Displays the current EMA distance in percent (without the % symbol).
• The warning threshold can be configured individually for each timeframe:
• 1m, 5m, 15m, 30m
• 1h, 4h, 8h
• 1D, 1W
• The active chart timeframe automatically determines which threshold is applied.

🔹 Customization
• Enable or disable EMA distance warnings via settings
• Adjust distance thresholds per timeframe
• Option to limit warning labels to one per bar
• Works on all markets and timeframes

🔹 Use Cases
• Trend identification
• Momentum exhaustion and consolidation detection
• Early warning before potential breakouts
• Trade confirmation in combination with other indicators

This indicator is non-repainting, lightweight, and designed for clean, actionable chart signals.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.