indicator · own pane · open source

MACD Histogram indicator

MACD Histogram is a free open-source indicator by @deepwick. MACD Histogram alone — the gap between MACD and its signal line, plotted as columns. Deepwick Script runs a subset of Pine Script.

Deepwick · @deepwickv1Updated 3 Nov 2026▲ 0 users
Running…
Loading chart…

What MACD Histogram does

MACD Histogram alone — the gap between MACD and its signal line, plotted as columns. Bar colour flips are the momentum-shift alerts.

  • Positive columns = bullish momentum building.
  • Shrinking bars = momentum weakening.
  • Pair with MACD/Signal for full context.

Source code

Deepwick Script, a subset of Pine Script · read-only

//@version=6
indicator("MACD Histogram", overlay=false)
fast = input.int(12, "Fast Length", minval=2, maxval=100)
slow = input.int(26, "Slow Length", minval=2, maxval=200)
sig = input.int(9, "Signal Length", minval=2, maxval=50)
src = input.source(close, "Source")
colorUp = input.color("color.green", "Color  Up")
colorDown = input.color("color.red", "Color  Down")
colorNeutral = input.color("color.gray", "Color  Neutral")
[m, s, h] = ta.macd(src, fast, slow, sig)
hline(0, "Zero", color=colorNeutral, linestyle=hline.style_dotted)
p_Histogram = plot(h, "Histogram", color=h >= 0 ? colorUp : colorDown, style=plot.style_columns)
alertcondition(ta.crossover(h, 0), "Histogram crosses zero up", "MACD histogram turned positive")
alertcondition(ta.crossunder(h, 0), "Histogram crosses zero down", "MACD histogram turned negative")

Comments

No comments yet.

Sign in to comment.