MACD Trendprediction Strategy V1
May 18, 2021

The MACD Trendprediction Strategy V1 tool is a trend-following strategy designed to identify market momentum by analyzing the distance and relationship between Double Exponential Moving Average (DEMA) based MACD lines.
Usage
The strategy is primarily used to identify and trade trend continuations. Unlike standard MACD indicators that rely solely on crossovers, this script focuses on the relationship between the zero-lag MACD line and its signal line.
- Bullish Trend: When the MACD line is above the signal line, the background turns green, signaling a long entry.
- Bearish Trend: When the MACD line falls below the signal line, the background turns red, signaling a position closure or exit.
Traders can use the visual background coloring to quickly determine the current market bias and the strength of the trend based on the expansion or contraction of the MACD histogram components.
Details
The strategy utilizes "Zero-Lag" principles by employing Double Exponential Moving Averages (DEMA) instead of standard EMAs. This reduces the inherent lag found in traditional trend-following indicators. The calculation process involves:
- Calculating a Fast DEMA and a Slow DEMA of the closing price.
- Determining the MACD Zero-Lag line by subtracting the Slow DEMA from the Fast DEMA.
- Applying a Signal Line, which is itself a DEMA of the MACD Zero-Lag line.
- Generating signals based on whether the MACD line is positioned above (bullish) or below (bearish) the Signal line.
Settings
Inputs
- DEMA Courte: Sets the period for the fast Double Exponential Moving Average (default is 12).
- DEMA Longue: Sets the period for the slow Double Exponential Moving Average (default is 26).
- Signal: Sets the smoothing period for the signal line (default is 9).
- Lignes: A toggle to show or hide the internal calculation lines (if supported by the visual output).
FAQ
How do I use the MACD Trendprediction Strategy V1?
You can apply the script to your chart and monitor the background colors; green indicates a bullish phase for long entries, while red indicates a bearish phase for exiting positions.
Can I change the sensitivity of the signals?
Yes, by adjusting the "DEMA Courte" and "DEMA Longue" settings, you can make the strategy more responsive to short-term price movements or more focused on long-term trends.
Where can I access this tool?
You can get access 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.