Alert Setup Guide

How to Set MACD Alerts: Signal Crosses and Histogram Changes

Configure MACD signal-line and zero-line alerts, understand their different meanings, and verify divergence logic and notification delivery.

Setup Steps

1

Identify the MACD series

Add MACD and record fast, slow and signal lengths, source, average types and timeframe. The usual 12/26/9 settings are a convention. The pane contains the MACD line, its signal line and their difference as the histogram.

2

Choose the signal-cross event

Open Create Alert and select a MACD/signal-line comparison or the built-in histogram sign-change condition. A histogram crossing zero corresponds to the MACD crossing its signal because the histogram is MACD minus signal. It is not an earlier, independent version of the same cross.

3

Keep zero-line and divergence rules separate

MACD crossing zero compares the fast and slow averages, rather than MACD with its signal average. Divergence instead compares swings in price and the oscillator. If using a divergence script, inspect its pivot confirmation delay and alert condition rather than assuming ordinary MACD crosses detect it.

4

Save the alert context

Choose the frequency, expiry and notification method in your account. For a rule defined on completed candles, select Once Per Bar Close where available. Record the symbol, timeframe and inputs. Recreate the alert after changing the script or its inputs; the running alert retains its saved configuration.

5

Verify delivery on new market data

Treat chart inspection and delivery as separate checks. Bar Replay can help inspect historical plots, but server alerts continue using live data. Check a new event against the alert log, then check the chosen notification channel. This is a test procedure, not a claim that delivery or investment performance has been tested here.

Alert Conditions Reference

Conditions to define and verify for the selected indicator.

Feature comparison table: Signal vs Notes
ConditionSignalNotes
Histogram changes from negative to positiveMACD moves above SignalEquivalent relationship for the same calculated series; no extra predictive lead is implied.
Histogram changes from positive to negativeMACD moves below SignalConfirm at the intended time; current-bar values can change.
MACD crosses zeroFast and slow averages change orderingDifferent from a MACD/Signal cross, and not necessarily more reliable.
Divergence rule becomes confirmedA specified price/oscillator swing patternRecord when the pattern becomes knowable, not only where a label is drawn.

Parameters to record and evaluate

Examples describe the configuration, not validated trading settings.

Feature comparison table: Starting value or requirement vs Description
ParameterStarting value or requirementDescription
Fast / slow lengths12 / 26, exampleChanging either alters the oscillator; keep the average type and source fixed when comparing versions.
Signal length9, exampleChanges smoothing of MACD and therefore the signal-cross timing.
Histogram referenceZeroHistogram equals MACD minus Signal; its sign follows their ordering.
Higher timeframeRecord if enabledA developing higher-timeframe value may change before that timeframe closes.

FAQ

Alert Setup FAQ

Does histogram zero crossing happen before the signal-line cross?
No. For identical series, histogram = MACD minus Signal. Crossing zero represents the same relationship changing sign. A shrinking histogram can precede a cross, but that is a different condition.
Can ordinary MACD alerts identify divergence?
The standard sign-change alerts do not encode a complete swing-comparison rule. A divergence implementation must specify pivots, confirmation and the series being compared.
Why did an alert occur without a final visible cross?
An intrabar cross can reverse before the candle closes. Also compare the running alert’s saved inputs with the current chart.
Which MACD timeframe is most accurate?
No universal accuracy ranking is established here. Evaluate the timeframe with fixed entry/exit rules, realistic costs and later data. Alert frequency alone is not a performance metric.

Need a custom alert rule?

Describe the condition in Pineify’s coding agent, then review the generated Pine Script and test its timing and delivery in TradingView.

Explore Pine Script coding