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

[amibroker] Re: Tushar chande's Adaptive Stoch



PureBytes Links

Trading Reference Links


Hi MM,

thanks a lot for this code of ADAPTIVE STOCH.

Is it also possible to come up with a flexible code that will allow us
to have ANY indicator "adaptive". I am thinking of an adaptive RSI,
adaptive EMA etc. ??

Thanks for any suggestions.

Werner


--- In amibroker@xxxxxxxxxxxxxxx, "micmus2002" <micmus2002@xxxx> wrote:
> 
> Think this should do it Rakesh,
> 
> 
> StDevPer=Param("Std Dev Period",20,10,30);
> lenmax= 28; 
> lenmin=7;
> currlen=0;
> stochma=0;
> v1 = StDev(C,StDevPer) ;
> v2 = HHV(v1, StDevPer) ;
> v3 = LLV(v1, StDevPer) ;
> 
> 
> 
> v4 =IIf (v1==v2,  1, IIf (v1=v3,0,IIf((V2 -V3) > 0,((v1 - v3)/(v2-
> v3)) ,0)));
> 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);
> 
> 
> Cheers
> 
> 
> MM
> 
> --- In amibroker@xxxxxxxxxxxxxxx, Rakesh Sahgal <rakeshsahgal@xxxx> 
> wrote:
> > Hi All
> > 
> > Following is the link to an article on Adaptive
> > Stochastic as created by Tushar Chande.
> > 
> > http://trader.online.pl/ELZ/t-i-Adaptive_Stochastic_Oscillator.html
> > 
> > Quite simple excepting for the key bit(isnt it always
> > that way!).
> > 
> > =======================================================
> > 
> > v1 = stddev(c,20) ;
> > v2 = highest(v1, 20) ;
> > v3 = lowest(v1, 20) ;
> > 
> > 
> >  {-- Create v4: stochastic oscillator for 20-day std.
> > dev. --}
> > {-- if v1=v2 (highest level) => v4 = 1; if v1=v3
> > (lowest level) => v4=0 --}
> > 
> > if (v2-v3) > 0 then v4 = ((v1 - v3)/(v2-v3)) Else v4 =
> > 0 ;
> > 
> > {-- Calculate current effective length; if v4 = 1,
> > then length = mininum --}
> > 
> > currlen = IntPortion(lenmin + (lenmax-lenmin)*(1-v4))
> > ;
> > 
> > ======================================================
> > 
> > 
> > Can some please help out with the coding of this
> > portion for ascertaining Stoch length?
> > 
> > 
> > TIA
> > 
> > 
> > Rakesh
> > 
> > 
> > 
> > 		
> > __________________________________ 
> > Do you Yahoo!? 
> > Yahoo! Personals - Better first dates. More second dates. 
> > http://personals.yahoo.com





------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

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