MACD Histogram
MACD Histogram is an indicator drawn in its own pane.
core language
1
indicator "MACD Histogram"2
pane: new3
4
input fast = 125
input slow = 266
input signal_length = 97
8
m = macd(close, fast, slow, signal_length)9
10
plot m.histogram, style: histogram, color: if m.histogram >= 0 then green.fade(30) else red.fade(30)11
plot m.macd, color: blue12
plot m.signal, color: orange13
hline 0, style: dotted, color: gray14
mark circle, at: below, when: crosses_above(m.macd, m.signal), color: greenWhat this script says
MACD Histogram is an indicator drawn in its own pane.
You can change 3 inputs: fast (default 12), slow (default 26) and signal_length (default 9).
It calculates m as the MACD (source the close, fast fast, slow slow, signal signal_length).
On the chart, it plots m.histogram, m.macd and m.signal; it also draws a horizontal line at 0; it also marks circle below the bar when m.macd crosses above m.signal.