Help with DMI and Hull MA script

hinkognito

New member
Happy Holidays Team,

Was hoping someone could help me with the following script. I placed a hull ma on the DMI oscillator and I want to have standard error channel on the hull ma. For some reason, the upper and lower plots are only showing partially.

Can someone have a look and see where I have messed up?

Many Thanks

Code:
declare lower;

input length = 10;
input hullma = 8;
input paintBars = yes;
input averageType = AverageType.WILDERS;

def diPlus = DMI(length, averageType)."DI+";
def diMinus = DMI(length, averageType)."DI-";

plot Osc = diPlus - diMinus;
plot Hist = Osc;
plot ZeroLine = 0;
plot HMA = hullMovingAvg(osc,hullma);

input Rlength = 89;
input standardErrors = 2;
def regression = InertiaAll(hma, rlength);
def stdError = sterrAll(hma, rlength);

plot UpperBand = regression + standardErrors * stdError;
plot MiddleBand = regression;
plot LowerBand = regression - standardErrors * stdError;

UpperBand.SetDefaultColor(GetColor(1));
MiddleBand.SetDefaultColor(GetColor(1));
LowerBand.SetDefaultColor(GetColor(1));
 

Similar threads

Top