OPEN-SOURCE SCRIPT

Advanced EMA's with True Range Signals

1 817
This indicator combines multiple layers of exponential moving averages (EMAs) with a dynamic True Range Filter (TRF) to help traders identify trends and potential entry signals. Designed with clarity and flexibility in mind, the tool features both fixed and adjustable EMAs alongside a custom-built volatility filter.

**Key Features:**

• **Multi-Timeframe Trend Analysis:**
- **Fixed EMAs:**
- **EMA 200 (White):** Serves as the long-term trend indicator, providing overall market context and acting as a dynamic support/resistance level.
- **EMA 9 (Red):** Captures short-term momentum for rapid entry/exit decisions.
These EMAs are hard-coded (with visibility toggles enabled by default) to ensure consistency in trend analysis.

• **Customizable EMAs:**
- Two adjustable EMAs are included for further personalization—one defaulting to a 21-period and the other to a 50-period. Their visibility toggles are off by default, allowing the user to activate them as needed for fine-tuned signal confirmation.

• **Dynamic True Range Filter (TRF):**
- The TRF adapts to market volatility by smoothing price fluctuations using a dual (fast and slow) period approach. This filter generates a dynamic threshold that helps differentiate genuine trend changes from price noise.
- In this version, the TRF is plotted in blue by default, providing a clear visual reference for the trend filter.

• **Signal Generation:**
- **Long Entry:** Occurs when the price is above the TRF combined with upward momentum, with a long signal label (displaying white text) marking potential buying opportunities.
- **Short Entry:** Occurs when the price drops below the TRF with accompanying downward momentum, with a short signal label displayed above the bar.
Alerts for both long and short entries are built in, allowing for timely notifications.

**User Experience:**
The indicator’s Inputs tab is streamlined by grouping all Exponential Moving Averages settings at the top, where fixed EMAs are always active and adjustable EMAs can be toggled on per user preference. The True Range Filter settings follow in their own group, enabling easy customization of its source and smoothing parameters. In the Styles tab, only the fixed EMAs (200 and 9) and the signal labels are enabled by default, while the adjustable EMAs and the TRF line are initially hidden—allowing the user to opt-in to additional overlays as desired.

This sophisticated blend of trend analysis and dynamic volatility filtering offers traders a robust tool for capturing market direction and timing entries. Whether you’re using it as a primary signal generator or a supplemental filter, it provides clarity in fast-moving markets.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.