Dema Supertrend
Sep 6, 2024

The Dema Supertrend indicator provides an advanced trend-following solution that combines the Double Exponential Moving Average (DEMA) with a volatility-adjusted Supertrend calculation to minimize lag and enhance responsiveness to market shifts. By replacing raw price data with DEMA-smoothed values, this tool aims to provide clearer trend signals with reduced market noise.
Usage
The Dema Supertrend is used primarily to identify the prevailing market direction and potential reversal points. Traders can use it to stay aligned with a trend or to set dynamic support and resistance levels based on current volatility.
- Trend Identification: When the price (or DEMA) is above the lower band, the indicator signals an uptrend (plotted in green). When below the upper band, it signals a downtrend (plotted in red).
- Volatility Management: Because the bands are derived from the Average True Range (ATR), they widen during high volatility and contract during low volatility, helping traders avoid false signals in choppy markets.
- Signal Generation: Crosses above or below the bands trigger trend change alerts, which can be used to confirm entries for long or short positions.
Details
The script innovates on the traditional Supertrend formula by utilizing a Double Exponential Moving Average (DEMA) as the baseline for the bands rather than a standard simple or exponential moving average.
- DEMA Calculation: The DEMA is calculated by taking a 2x EMA of the price and subtracting a second EMA of that EMA. This mathematical structure is designed specifically to eliminate the lag inherent in standard moving averages.
- Band Construction: The upper and lower bands are calculated by adding/subtracting a multiple of the ATR from the DEMA value.
- Persistence Logic: To prevent "whipsawing," the script includes logic that maintains the current band level unless price action definitively breaks through to the opposite side, ensuring the trend persists through minor fluctuations.
Settings
Dema Supertrend
- Supertrend Len: The period used to calculate the Average True Range (ATR), determining the sensitivity of the volatility component.
- Supertrend Multiple: The multiplier applied to the ATR. A higher value creates wider bands and fewer signals, while a lower value makes the indicator more sensitive.
Smoothing Dema Supertrend
- Dema len: The period for the Double Exponential Moving Average. Shorter lengths respond faster to price changes, while longer lengths offer smoother trend detection.
- Dema source: The price input used for the DEMA calculation (default is hlc3).
FAQ
How do I access Dema Supertrend?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
What makes this different from a normal Supertrend?
Standard Supertrend indicators typically use raw price data or a simple moving average. This version uses DEMA, which is specifically engineered to reduce lag, allowing for earlier trend detection.
Can I use this for scalping?
Yes, by adjusting the DEMA length and the Supertrend Multiplier to lower values, the indicator becomes highly responsive to short-term price movements suitable for scalping and day trading.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.