All indicators

MACD crossover overlay with alert

Aug 30, 2019

Static chart image
Dynamic OverlaysSignalsOscillators

The MACD crossover overlay with alert indicator visualizes bullish and bearish MACD crossovers directly on the price chart, allowing traders to identify momentum shifts without needing a separate oscillator pane.

Usage

The Usage section focuses on identifying trend reversals and momentum shifts directly through on-chart shapes. A green upward triangle plotted below the bar indicates a bullish MACD crossover, suggesting potential upward momentum. Conversely, a red downward triangle plotted above the bar indicates a bearish MACD crossover, suggesting potential downward momentum. This tool is particularly useful for traders who want to keep their workspace clean while still monitoring MACD signal line interactions.

Details

The script utilizes the standard Moving Average Convergence Divergence (MACD) calculation, which compares a fast EMA to a slow EMA. The crossover signals are generated when the resulting MACD line crosses its signal line (an EMA of the MACD line itself). By overlaying these signals on the price action, users can quickly correlate momentum changes with specific candle patterns or support/resistance levels.

Settings

  • Fast moving average: The period used for the shorter-term exponential moving average in the MACD calculation.
  • Slow moving average: The period used for the longer-term exponential moving average in the MACD calculation.
  • Signal Length: The smoothing period (EMA) applied to the MACD line to create the signal line.

FAQ

How do I use the alerts for this script?

You can set up alerts by clicking the "Alerts" icon in TradingView and selecting this indicator. It supports both standard alertcondition and dynamic alert() functions for "MACD Bearish Crossover" and "MACD Bullish Crossover" events.

Can I change the visual appearance of the signals?

Yes, the color and size of the triangles can be modified within the "Style" tab of the indicator settings menu.

How can I access the MACD crossover overlay with alert?

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.