PROTECTED SOURCE SCRIPT

Ghost Super EMA

32
Ghost Super EMA: Dynamic Dual-Filter Trend System
Indicator Overview
The GHOST SUPER EMA is a robust trend-following indicator designed to give traders a comprehensive view of trend direction, volatility, and bias. It achieves this by combining a unique mashup of two distinct Supertrend bands with a single Exponential Moving Average (EMA).

The result is a triple-layered visualization of the market's structure: the two Supertrend bands form a Dynamic Cloud for visual support/resistance, and the EMA provides a crucial speed confirmation filter.

Core Components & Technical Justification
The core of this indicator functions powerfully on the current chart timeframe when the Timeframe input is left blank. The components are combined to create a unique, layered filtration system:

Outer Supertrend (Factor 3.35): This is the Macro-Trend Boundary. Its higher factor creates a slower, wider band that acts as the primary threshold for trend direction, preventing noise-related whipsaws often seen with standard settings.

Inner Supertrend (Factor 1.67): This is the Volatility Boundary. Its lower factor makes it quicker and measures current market momentum. It provides an early alert for volatility contraction or expansion within the established macro-trend.

Supertrend Cloud: The visual area between the two Supertrend bands represents a Dynamic Support/Resistance Zone. The cloud's width reflects market volatility. Price trading within this zone signals potential consolidation or momentum loss. Its color is determined by the Close price relative to the Outer Supertrend.

EMA (Length 20): This is the Speed Confirmation Filter. A classic trend measurement, its color (Green/Red) serves as an independent velocity check, validating the primary trend signal from the Supertrend Cloud.

Trading Signals and Confirmation
A confirmed trading bias requires the simultaneous alignment of both the Cloud and the EMA:

🟢 Bullish Confirmation (Go Long): The Supertrend Cloud is Green (Price above Outer ST) AND the EMA is Green (Price above EMA).

🔴 Bearish Confirmation (Go Short): The Supertrend Cloud is Red (Price below Outer ST) AND the EMA is Red (Price below EMA).

Optional Advanced Filtering: Multi-Timeframe (MTF) Tool
The Timeframe input is optional and serves as an advanced filter for obtaining market context.

Function: By entering a Higher Timeframe (HTF) value (e.g., entering "4H" or "D"), the indicator uses the request.security() function to fetch all three components (Dual Supertrend and EMA) from that stable, larger timeframe.

Utility: This anchors trading decisions to the macro-trend, filtering out lower-timeframe noise and false signals. Traders can ensure their entries on a fast chart (e.g., 5-minute) are aligned with the dominant trend of the chosen higher timeframe (e.g., 1-hour). If the input is left blank, the indicator runs on the current chart's timeframe.

Customizable Settings
The following inputs are available for user configuration:

ATR Length: Period for Average True Range calculation (Default: 10).

Supertrend Factor 1: Factor for the Outer (Slow) Supertrend (Default: 3.35).

Supertrend Factor 2: Factor for the Inner (Fast) Supertrend (Default: 1.67).

EMA Length: Period for the Exponential Moving Average (Default: 20).

Timeframe: Optional MTF input. Leave blank for current chart timeframe (Default: "").

Disclaimer: Past performance is not indicative of future results. This indicator is a tool for technical analysis and should not be used as the sole basis for trading decisions.

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.