Has anyone seen the McGinley Dynamic Indicator floating around for eSig?
McGinley Dynamic:
Ref(Mov(C,12,E),-1)+((C-(Ref(Mov(C,12,E),-1))) / (C/(Ref(Mov(C,12,E),-1))*125))
which I would think goes something like this:
but my coding is not so hot, so I'm not quite sure what to do here.
McGinley Dynamic:
Ref(Mov(C,12,E),-1)+((C-(Ref(Mov(C,12,E),-1))) / (C/(Ref(Mov(C,12,E),-1))*125))
which I would think goes something like this:
PHP Code:
function preMain() {
setPriceStudy(true);
setStudyTitle("McGinley Dynamics");
setCursorLabelName("McG_D", 0);
setPlotType(PLOTTYPE_INSTANTCOLORLINE, 0);
setDefaultBarFgColor(Color.blue, 0);
setDefaultBarThickness(1,0);
var fp1 = new FunctionParameter("MALength", FunctionParameter.NUMBER);
fp1.setLowerLimit(1);
fp1.setDefault(12);
var fp2 = new FunctionParameter("Smoothing", FunctionParameter.NUMBER);
fp2.setLowerLimit(0);
fp2.setDefault(125);
var vMcGD = null;
}
function main(MALength,Smoothing) {
var i=0;
McGD = (ema(MALength, close(i-1))) + (close(i)- (ema(MALength, close(i-1)))) / (close(i) / (ema(MALength, close(i-1))*Smoothing));
return McGD;
}
Comment