[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Help for Klinger Volume Oscillator (KVO)



PureBytes Links

Trading Reference Links

Hi!!
 
Thanks a lot to Roser and Mohany.
 
Regards
Hitesh

mohany1@xxxxxxxxxxx wrote:
This may work. Need to compare the plots with a known graph.

_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', gets yerterdays value through AMA

//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") );

_SECTION_END();
-------------- Original message ----------------------
From: "hitash_pandya"
> Hello,
> I am looking for the Klinger Volume Oscillator (KVO) in afl script.
> May I request help for this ?
> AFL written by me is not seems to be accurare. I think, Loop should
> be used in AFL, which I am not conversent with. AFL written by me is
> as under:-
>
> /////////////////////////////////////////////////////////////////
> a=H+L+C;
> b=Ref(a,-1);
> Trend=IIf(a > b, 1,-1);
> //dm = daily movement
> dm = H - L;
> Cm = Cum(dm);
> Cm = IIf(trend=-1,Ref(Cm,-1)+dm, Ref(dm,-1) + dm);
> Vf= V * (2 *( dm/Cm -1)) * trend * 100;
> KO = EMA(Vf,34) - EMA(Vf,55);
> Plot(ko,"KO",colorBlue,styleLine);
> TL = EMA(KO,13);
> Plot(TL,"TL",colorBlue,styleLine);
> ////////////////////////////////////////////////////////////////
>
> Mathamatical Experssion of KVO availabe at:-
> http://www.fmlabs.com/reference/default.htm?url="">>
> Thanks in advance.
> Hitesh
>
>


From: "hitash_pandya" <hitash_pandya@xxxxxxxxxxx>
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Help for Klinger Volume Oscillator (KVO)
Date: Fri, 11 Apr 2008 07:21:50 +0000

Hello,
I am looking for the Klinger Volume Oscillator (KVO) in afl script.
May I request help for this ?
AFL written by me is not seems to be accurare. I think, Loop should
be used in AFL, which I am not conversent with. AFL written by me is
as under:-

/////////////////////////////////////////////////////////////////
a=H+L+C;
b=Ref(a,-1);
Trend=IIf(a > b, 1,-1);
//dm = daily movement
dm = H - L;
Cm = Cum(dm);
Cm = IIf(trend=-1,Ref(Cm,-1)+dm, Ref(dm,-1) + dm);
Vf= V * (2 *( dm/Cm -1)) * trend * 100;
KO = EMA(Vf,34) - EMA(Vf,55);
Plot(ko,"KO",colorBlue,styleLine);
TL = EMA(KO,13);
Plot(TL,"TL",colorBlue,styleLine);
////////////////////////////////////////////////////////////////

Mathamatical Experssion of KVO availabe at:-
http://www.fmlabs.com/reference/default.htm?url="">

Thanks in advance.
Hitesh



Did you know? You can CHAT without downloading messenger.
Click here __._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___