All indicators

Median MACD

Jan 8, 2025

Static chart image
Price Action BasedSignalsMoving Averages

The Median MACD - Mattes indicator utilizes median-based price data within a Moving Average Convergence Divergence framework to provide a smoother trend-following signal with reduced market noise.

Usage

The Median MACD - Mattes is primarily used to identify trend direction and momentum shifts. By replacing the standard price source with a median calculation, the resulting histogram is less susceptible to outliers and sudden price spikes.

Traders can use the indicator in the following ways:

  • Trend Identification: When the histogram is green and above the zero line, it indicates bullish momentum. Conversely, a red histogram below the zero line indicates bearish momentum.
  • Momentum Weakening: The color gradients (solid vs. transparent) highlight whether the momentum is accelerating or decelerating. A faded color suggests that the current trend may be losing strength.
  • Zero-Line Crosses: Crosses above or below the zero line can serve as signals for potential trend reversals or entry points.

Details

The script functions by first calculating the median price over a user-defined lookback period using a percentile-based approach. This median value is then used as the source for two Exponential Moving Averages (EMAs)—a fast and a slow length.

The difference between these two EMAs forms the MACD value, which is then compared against a signal line (an EMA of the MACD value itself). The final output displayed is the "delta" or histogram, representing the distance between the MACD and its signal line. This specific implementation focuses on the histogram's rate of change to provide visual feedback on momentum velocity.

Settings

Median MACD

  • Fast Length: Sets the period for the shorter Exponential Moving Average.
  • Slow Length: Sets the period for the longer Exponential Moving Average.
  • MACD Length: Determines the smoothing period for the signal line.
  • Median Period: Defines the lookback window used to calculate the median price source.

FAQ

How do I interpret the histogram colors?

Solid colors represent momentum moving in the direction of the trend (accelerating), while transparent/faded colors indicate the momentum is slowing down (decelerating) relative to the previous bar.

Can this be used on any timeframe?

Yes, the Median MACD is adaptive and can be applied to any timeframe, though the Median Period and EMA lengths should be adjusted to suit the specific volatility of the chosen asset.

How can I access Median MACD - Mattes?

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.