Adding a Hull Moving Avg to Money Flow Oscillator


Category:
0
0

I was wanting to find out how to set up a Hull moving average to the TOS Money Flow Oscillator.  I had tried to do it with the following Thinkscript:

declare lower;

input MFLength = 20;
input MALength = 3;
input over_bought = 80;
input over_sold = 20;

def division = (high – low[1]) + (high[1] – low);
def multiplier;
if high < low[1] {
multiplier = -1;
} else if low > high[1] {
multiplier = 1;
} else if division == 0 {
multiplier = 0;
} else {
multiplier = ((high – low[1]) – (high[1] – low)) / division;
}

plot MoneyFlowOsc = Sum(multiplier * volume,MFLength) / Sum(volume,MFLength);

plot ZeroLine = 0;
plot OverBought = over_bought;
OverBought.SetDefaultColor(GetColor(1));

plot OverSold = over_sold;
OverSold.SetDefaultColor(GetColor(1));

plot OBVAvg = Average(MoneyFlowOsc, MFLength);
plot MA = HullMovingAvg(OBVAvg,MALength);
MoneyFlowOsc.SetDefaultColor(GetColor(1));
ZeroLine.SetDefaultColor(GetColor(7));
MA.SetDefaultColor(GetColor(5));

I just end up getting three horizontal green lines.  Any help is appreciated getting it to work.

Thanks!

RESOLVED
Marked as spam
Posted by (Questions: 1, Answers: 1)
Asked on July 2, 2019 11:11 am
120 views
0
Private answer

Turn off the plots for Overbought and Oversold.

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on July 2, 2019 12:49 pm
0
Thanks Pete - got it tweaked!
( at July 3, 2019 9:23 am)