Klinger Oscillator for Amibroker (AFL)
Yohannes over 15 years ago Amibroker (AFL)
A technical indicator developed by Stephen Klinger that is used to determine long-term trends of money flow while remaining sensitive enough to short-term fluctuations to enable a trader to predict short-term reversals. This indicator compares the volume flowing in and out of a security to price movement, and it is then turned into an oscillator.
it’s not my own…i’m just modified from one’s error coding afl (i have forgotten who was)
Screenshots
Indicator / Formula
_SECTION_BEGIN("Klinger Oscillator");
x = H+L+C;
trend = IIf(x>Ref(x,-1), 1, -1);
//trend = Cum(trend0);
dm = (H-L);
trend_dif = trend - Ref(trend, -1);
cm_today = IIf(trend_dif != 0, Ref(dm, -1), 0);
sf = IIf(trend_dif !=0, 1, 0); //Smoothing factor -- 1 or '0'
fb = IIf(trend_dif == 0, 1, 0); // feedback factor -- 1 or '0', //Cm0 = dm + fb * AMA(cm_today, 0);
cm = dm + sf*Ref(dm, -1) + fb * AMA(cm_today, 0);
Vf0 = (dm/cm -1 ) *2;
Vf = Vf0 * V *trend*100;
KO = EMA(Vf,34) - EMA(Vf,55);
Plot(ko, _DEFAULT_NAME(), ParamColor( "Color", colorBlue ), ParamStyle("Style")
);
0 comments
Leave Comment
Please login here to leave a comment.