MACD DEMA TOFF Alert Script
Jun 13, 2020

The MACD DEMA TOFF Alert Script indicator provides a momentum-based signaling system that utilizes Double Exponential Moving Averages (DEMA) to reduce lag compared to standard MACD calculations. This tool is designed to identify trend reversals and momentum shifts by monitoring the intersection of the zero-lag MACD line with specific threshold values.
Usage
The Usage section focuses on how the indicator generates visual signals on the chart based on the relationship between the DEMA-based MACD line and user-defined levels.
Unlike traditional MACD strategies that rely on the crossover between the MACD line and the Signal line, this script generates "Long" labels when the MACD line crosses above a specific value (default 0) and "Short" labels when it crosses below a specific value (default 0). This approach filters out minor fluctuations and focuses on broader momentum shifts relative to the zero-axis.
Details
This script is an implementation of Toff's DEMA MACD concept, optimized for alerting and visual clarity. The calculation process involves:
- DEMA Fast/Slow: Calculating two Double Exponential Moving Averages to capture price action with significantly less lag than a standard EMA.
- Zero-Lag MACD Line: The difference between the fast DEMA and slow DEMA.
- Zero-Lag Signal Line: A DEMA applied to the MACD line itself.
- Crossover Logic: Signals are triggered when the
ligneMacdZeroLagcrosses the user-definedLong ValueorShort Value.
Settings
- DEMA Courte: The period for the fast DEMA calculation (default 12).
- DEMA Longue: The period for the slow DEMA calculation (default 26).
- Signal: The period for the signal line calculation (default 9).
- Lignes: Toggles the visibility of specific calculation lines.
- Long Value: The threshold value that the MACD line must cross above to trigger a Long signal.
- Short Value: The threshold value that the MACD line must cross below to trigger a Short signal.
FAQ
How do I use the MACD DEMA TOFF Alert Script?
The script is applied directly to the chart. You can monitor the "Long" and "Short" labels for potential entry or exit points based on zero-level momentum crossovers.
How do I set up alerts for this indicator?
You can use the built-in TradingView alert menu and select the "Long", "Short", or "Any Signal" conditions provided by the script to receive real-time notifications.
Where can I find more tools like this?
You can access (MACD DEMA TOFF Alert Script) and other advanced tools on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
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.