All indicators

MACD Enhanced System MTF with optional TSL and Alerts

Feb 21, 2019

Static chart image
SignalsOscillatorsTrailing-Stop

The MACD Enhanced System MTF with optional TSL and Alerts indicator provides a comprehensive analysis of MACD, Signal line, and Histogram movements across multiple timeframes to identify trend-following entry points.

Usage

The indicator is designed to help traders identify trend reversals and continuations by combining data from the current chart timeframe and an automatically calculated higher timeframe (HTF).

  • Trend Identification: Long signals (Buy) are generated when the combined weighted score of the current and higher timeframe MACD dynamics crosses above zero. Short signals (Sell) occur when the score crosses below zero.
  • Weighted Scoring: The script evaluates the direction of the MACD line and the Histogram, assigning scores based on their relative strength. For example, if both the MACD line and Histogram are increasing, it adds both the "Indicator Direction Score" and "Histogram Direction Score" to the total calculation.
  • Automatic Multi-Timeframe (MTF): Users do not need to manually select a higher timeframe; the script automatically determines the most appropriate HTF based on the current chart (e.g., if you are on a 15m chart, it pulls data from the 60m chart).

Details

The indicator calculates a "result" value which is a weighted average of the current timeframe's MACD analysis and the higher timeframe's analysis. The internal logic assesses three primary factors:

  1. MACD Direction: Whether the MACD line is trending up or down.
  2. Histogram Direction: Whether the momentum (the gap between MACD and Signal) is expanding or contracting.
  3. Cross Events: Significant points are added to the score when the MACD line crosses the Signal line, with a decay factor applied to previous crosses to ensure the signal remains relevant to recent price action.

Settings

  • MACD Fast Length: The period for the shorter Exponential Moving Average (default is 12).
  • MACD Slow Length: The period for the longer Exponential Moving Average (default is 26).
  • MACD Signal Length: The smoothing period for the MACD Signal line (default is 9).
  • Cross (buy/sell) Score: The weight assigned to a MACD/Signal line crossover event.
  • Indicator Direction Score: The weight assigned to the direction (slope) of the MACD line.
  • Histogram Direction Score: The weight assigned to the direction of the MACD Histogram bars.

FAQ

How do I use the automatic MTF feature?

The script handles this automatically. It detects your current chart interval and requests data from a predefined higher timeframe to ensure your signals are aligned with the broader trend.

What do the labels on the chart represent?

"MACD Long" labels appear when the multi-timeframe weighted score turns positive, indicating a potential bullish trend. "MACD Short" labels appear when the score turns negative, indicating a potential bearish trend.

How 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.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.