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
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.
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.
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.
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.
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.
| Condition | Signal | Notes |
|---|---|---|
| Histogram changes from negative to positive | MACD moves above Signal | Equivalent relationship for the same calculated series; no extra predictive lead is implied. |
| Histogram changes from positive to negative | MACD moves below Signal | Confirm at the intended time; current-bar values can change. |
| MACD crosses zero | Fast and slow averages change ordering | Different from a MACD/Signal cross, and not necessarily more reliable. |
| Divergence rule becomes confirmed | A specified price/oscillator swing pattern | Record 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.
| Parameter | Starting value or requirement | Description |
|---|---|---|
| Fast / slow lengths | 12 / 26, example | Changing either alters the oscillator; keep the average type and source fixed when comparing versions. |
| Signal length | 9, example | Changes smoothing of MACD and therefore the signal-cross timing. |
| Histogram reference | Zero | Histogram equals MACD minus Signal; its sign follows their ordering. |
| Higher timeframe | Record if enabled | A developing higher-timeframe value may change before that timeframe closes. |
FAQ
Alert Setup FAQ
Does histogram zero crossing happen before the signal-line cross?
Can ordinary MACD alerts identify divergence?
Why did an alert occur without a final visible cross?
Which MACD timeframe is most accurate?
Official documentation
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