Skip to content
All library documents

Multi-Timeframe MACD Crossovers, Trend Colors, and Close-Based Alerts

Article Strategy library · Author: ChaoZhang

Summary

This TradingView indicator calculates MACD from configurable fast and slow averages, then compares it with a smoothed signal line. Users can choose the indicator timeframe, source price, EMA or SMA calculations, and display options for the lines, histogram, cross markers, background, and price-bar colors. Histogram colors distinguish whether momentum is rising or falling above or below zero.

The script marks MACD/signal-line crosses and can alert on either direction or on crosses filtered by the MACD zero line. Alerts are set to trigger at bar close and include the symbol, chart timeframe, and closing price. The source also includes long and short strategy entries for the zero-line-filtered crosses, but provides no performance results. Although the indicator supports higher-timeframe data, the document gives no guidance on timeframe selection, signal validation, or avoiding lookahead and repainting concerns. Its settings and visual cues describe a configurable technical indicator, not evidence that the crossover rules are profitable.

Key ideas

  • MACD is calculated as the difference between configurable fast and slow moving averages, with a separately smoothed signal line.
  • The indicator can request calculations on a selected timeframe and supports EMA or SMA methods.
  • Histogram colors encode whether the MACD histogram is increasing or decreasing above or below zero.
  • Alerts can report ordinary crosses or crosses filtered by whether MACD is above or below zero, and trigger at bar close.
  • The document provides configuration and signal logic but no evidence of trading performance.

Tags

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