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

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to