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

RE: [RT] Digest Number 647



PureBytes Links

Trading Reference Links

Terry,
The Adaptive Stochastic code listed in your email was originally based on
Tushar Chande's indicator but in it's present form is very different.  This
version uses DSP techniques where Chandes uses a standard deviation function
to change the length and had set limits.  The current version uses the
Hilbert transform to determine length and is not limited in length high or
low.  Chande's version was not smoothed.

Here's the Chande code for you to compare.

Regards;
John

{TRADESTATION CODE FOR ADAPTIVE STOCHASTIC OSCILLATOR}
{--- (c) 2K Tushar Chande; Adaptive Stochastic Oscillator ---}

	vars: v1(0), v2(0), v3(0), v4(0) ;
	vars: lenmax(28), lenmin(7), currlen(0) ;
	vars: hh(0), ll(0), stoch(0), stochma(0) ;

{--- Calculate 20-day std. Dev. And its 20-day range ---}

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

{--- Calculate stochastic oscillator and its 3-day exponential average ---}

	hh = highest(h, currlen) ;
	ll = lowest(l, currlen) ;
	if (hh-ll) > 0 then stoch = ((close - ll)/(hh - ll)) * 100 ;
	if currentbar = 1 then stochma = 0 else
		stochma = 0.5*stoch + 0.5*stochma[1] ;

{--- Plot data ---}

	plot1(stoch, "adapt_stoch") ;
	plot2(stochma, "stochma") ;
	plot3(80, "hi_ref") ;
	plot4(20, "lo_ref") ;

{ --- End of code -}


-----Original Message-----
From: Terry [mailto:terrence@xxxxxxxxxxxxxx]
Sent: Wednesday, October 31, 2001 9:25 AM
To: realtraders@xxxxxxxxxxxxxxx
Subject: Re: [RT] Digest Number 647


For some time I have been trying to find background explanation on Chande's
adaptive stochastic. Can't find it presented in TASC. Was it first
introduced in either of his books: The New Technical Trader or Beyond
Technical Analysis?

Amazon.com's reprint of the index from New Technical Trader doesn't list
the adaptive stochastic.

Any guidance to his original presentation would be appreciated.

I would also appreciate anyone's thoughts on either of Chande's two books.
Are they worth buying? His past articles in TASC were terse, IMO. More meat
than fluff. Do the books follow through?

Terry Minke

At 09:14 AM 10/29/2001, you wrote:
>Message: 2
>    Date: Sun, 28 Oct 2001 08:59:30 -0700
>    From: c_r@xxxxxxxxx
>Subject: Re: Adaptive Stochastic
>
>Thanks Clyde.  Should be able to set it up from here.
>
>Charles Marchand
>
>At 10:31 PM 10/27/01 -0500, you wrote:
> >Again, attached .ela for code listed below.
> >
> >Below code is just indicator and you will need to import
> >.ela to get other functions needed.
> >
> >
> >{*********************************************************************
> >TRADESTATION CODE FOR ADAPTIVE STOCHASTIC OSCILLATOR
> >(c) 2K Tushar Chande; Adaptive Stochastic Oscillator
> >
> >History:
> >  6/20/01 - changed how adaptive length is calculated.(John Hall)


To unsubscribe from this group, send an email to:
realtraders-unsubscribe@xxxxxxxxxxxxxxx



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



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Protect your servers with 128-bit SSL encryption! Grab your copy of VeriSign's FREE guide: "Securing Your Website for business" Get it Now!
http://us.click.yahoo.com/M.WTOC/m1FDAA/cosFAA/zMEolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
realtraders-unsubscribe@xxxxxxxxxxxxxxx

 

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