Skip to content
All library documents

Multi-Timeframe MACD with Trend Coloring and Crossover Alerts

Article TradingView scripts

Summary

This indicator calculates MACD from configurable fast and slow moving averages, with selectable SMA or EMA methods for both the oscillator and signal line. A timeframe input lets the user request calculations at another timeframe. The display can show the MACD and signal lines, histogram, crossover dots, background highlights, or price-bar coloring. Histogram colors distinguish whether momentum is rising or falling above or below zero, while line colors can reflect the MACD and signal relationship.

Alerts can mark ordinary upward and downward crosses or stricter crosses that also occur on the corresponding side of zero. They are configured to fire at bar close and include symbol, timeframe, and closing price details. The document describes indicator features and implementation updates, not a trading system or empirical test. It supplies no evidence that its crossover signals predict returns, and users should account for the behavior of calculations requested from a different timeframe.

Key ideas

  • The indicator supports configurable MACD lengths, source, moving-average types, and calculation timeframe.
  • Histogram colors encode whether the MACD histogram is growing or shrinking above or below zero.
  • Optional plots and bar or background colors visualize trend states and crossover events.
  • Alerts can be restricted to upward crosses above zero or downward crosses below zero.
  • The document provides no performance evidence for trading the indicator signals.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.