I'm trying to build a MACD using a custom MA. The data is not getting plotted. My script is located here:
EFS Study Suggestions/Hull
I could use some help.
EFS Study Suggestions/Hull
I could use some help.
f_Study2 = wma( Math.floor( Math.sqrt( Period ) ));
s_Study2 = wma( Math.floor( Math.sqrt( Period ) ));
} // end of bInitialized routine
fPlot = f_Study2.getValue(0);
sPlot = s_Study2.getValue(0);
if (fPlot == null || sPlot == null) return; // add null check
aMACD = sPlot - fPlot;
aSignal = ema(nLen, aMACD)
return new array ( aMACD.getValue(0), aSignal.getValue(0) );
}
// bInitialized routine
aMACD = efsInternal("calcMACD", s_Study2, f_Study2);
bInitialized = true;
}
function calcMACD(s, f) {
return (s.getValue(0) - f.getValue(0));
}
Comment