I need help adding histogram with this indicator. Thank you!
Code:
#
# TD Ameritrade IP Company, Inc. (c) 2008-2021
#
declare lower;
input smoothingLength = 3;
def haclose = (open + high + low + close) / 4;
def haopen = CompoundValue(1, (haopen[1] + haclose[1]) / 2, (open[1] + close[1]) / 2);
def diff = haclose - haopen;
plot HADiff = diff;
plot Avg = Average(diff, smoothingLength);
plot ZeroLine = 0;
HADiff.SetDefaultColor(GetColor(1));
Avg.SetDefaultColor(GetColor(8));
ZeroLine.SetDefaultColor(GetColor(5));