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

RE: [amibroker] Re: Adaptive indicators / variable periods



PureBytes Links

Trading Reference Links

Thomas,

That’s a good example of the kind of thing I want to do…but was stopping myself from even trying as, until Corey helped me see the light, I had assumed that the functions such as HHV, LLV could only take constant values. Can you tell I’ve spent too long using Metastock??!! J

Thanks for the reply.

Regards,

Andy

 

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Thomas Ludwig
Sent: 30 March 2006 20:43
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Re: Adaptive indicators / variable periods

 

Andy,

another possibility is using standard deviation for writing adaptive
indicators. Example:

StDevPer=Param("Std Dev Period",20,10,30);
lenmax= 28;
lenmin=7;

v1 = StDev(C,StDevPer) ;
v2 = HHV(v1, StDevPer) ;
v3 = LLV(v1, StDevPer) ;

V4=(V1-V3)/(V2-V3);
currlen = int(lenmin + (lenmax-lenmin)*(1-v4));
hh = HHV(H, currlen) ;
ll = LLV(L, currlen) ;
stoch = IIf ((hh-ll) > 0 ,((Close - ll)/(hh - ll)) * 100,0); ;
stochma =EMA(Stoch,3);
Plot(Stoch,"Adaptive Stochastic",colorRed,styleLine);
Plot(stochma,"StochK",colorBlue,styleLine);

Regards, Thomas



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 other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS