Hello all,
Anyone can help me to create upper signals (up/down arrows, etc) whenever the Avg line (Avg = Average(diff, smoothingLength) crosses the Zero line?
I'm not good with coding.
The code/indicator is below.
Btw, it's just the HeikinAshiDiff indicator in ToS.
Thank you!
Anyone can help me to create upper signals (up/down arrows, etc) whenever the Avg line (Avg = Average(diff, smoothingLength) crosses the Zero line?
I'm not good with coding.
The code/indicator is below.
Btw, it's just the HeikinAshiDiff indicator in ToS.
Thank you!
Code:
##########
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));