MACD-X Overlay, More Than MACD
Four MACD engines. One overlay. No extra pane needed.
MACD is one of the most widely used indicators in trading - and one of the most misunderstood. Most traders use a single implementation: fast EMA minus slow EMA, smoothed into a signal line. But MACD is a framework, not a fixed formula. Different calculation methods emphasise different aspects of momentum - some react faster to price changes, some smooth out noise more aggressively, some focus on the histogram rather than the line. Knowing which variant suits your current market condition matters.
MACD-X Overlay brings four distinct MACD calculation engines into a single script, projects the result directly onto the price chart without requiring a separate pane, and includes early warning and confirmed alert conditions for both long and short signals.
Four MACD Calculation Methods
MACD Traditional - the classic implementation. Fast EMA minus slow EMA, with a signal line applied to the result. The baseline against which all other variants should be compared. Reliable in trending conditions, prone to whipsaws in choppy markets.
MACD-AS (Histogram) - a histogram-driven variation that subtracts the signal line from the MACD line before further processing, placing greater emphasis on momentum acceleration and deceleration than on the raw line position. The histogram becomes the primary signal rather than a secondary indicator.
MACD Leader - a reduced-lag variant that compensates for the inherent delay in moving average calculations by adding the deviation of source from the fast average and subtracting the deviation from the slow average. Signals appear earlier relative to Traditional MACD, at the cost of slightly more sensitivity to noise.
MACD Source - a source-adaptive smoothing model that applies the signal smoothing period to the deviation of price from the midpoint of the fast and slow averages. This variant is less sensitive to the absolute values of the fast and slow lengths and more focused on where current price sits relative to the averaged trend axis.
All four methods use the same fast length, slow length, signal smoothing, and MA type inputs - making direct visual comparison between methods straightforward by switching the selection without changing any other setting.
On-Chart Overlay
Rather than occupying a separate pane, MACD-X projects all three components - MACD line, signal line, and histogram - directly onto the price chart, scaled to fit within the visible price range. The histogram uses the same four-colour scheme familiar from standard MACD: dark green for accelerating positive momentum, light green for decelerating positive momentum, light red for decelerating negative momentum, and dark red for accelerating negative momentum.
Placement above or below price, overlay height, and vertical position are all configurable. An optional fill between the MACD and signal lines colour-codes the area by momentum dominance - blue when MACD is above signal, orange when below - providing an immediate visual read on momentum regime without requiring close attention to the line positions.
MACD/Signal Cross Labels
Optional on-chart labels mark each MACD/signal crossover directly on the price bars - a green label below the bar on bullish crosses, a red label above on bearish crosses. These complement the alert system by making signal history visible directly on the chart.
Alerts
Four alert conditions are built in, operating in two pairs. Early Warning alerts fire on the bar when MACD crosses signal - before the bar is confirmed, providing advance notice of a potential signal. Confirmed alerts fire one bar later when the cross is closed and established. Both long and short versions are available, giving traders the choice between early positioning and confirmed entry.
Fast length, slow length, signal smoothing, source, oscillator MA type, signal MA type, display length, placement, height, and vertical position are all fully configurable.