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

Re: [RT] Digest Number 669



PureBytes Links

Trading Reference Links


The code is in the subscribers area:  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 -}


- - - - - - - - - - - - - - - - - - - - -  - - - - - - -Clyde 
Lee   
Chairman/CEO          (Home of 
SwingMachine)SYTECH 
Corporation          email: <A 
href="mailto:clydelee@xxxxxxxxxxxx";>clydelee@xxxxxxxxxxxx  7910 
Westglen, Suite 105       
Office:    (713) 783-9540Houston,  TX  
77063               
Fax:    (713) 783-1092Details 
at:                      
www.theswingmachine.com- - - - 
- - - - - - - - - - - - - - - -  - - - - - - - -
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  ----- Original Message ----- 
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black">From: 
  M. 
  Simms 
  To: <A title=realtraders@xxxxxxxxxxxxxxx 
  href="mailto:realtraders@xxxxxxxxxxxxxxx";>realtraders@xxxxxxxxxxxxxxx 
  
  Cc: <A title=JSweeney@xxxxxxxxxxx 
  href="mailto:JSweeney@xxxxxxxxxxx";>John Sweeney S&C ; <A 
  title=jrhall@xxxxxxxxxxxx 
  href="mailto:jrhall@xxxxxxxxxxxx";>jrhall@xxxxxxxxxxxx 
  Sent: Saturday, November 10, 2001 
  20:00
  Subject: RE: [RT] Digest Number 669
  Thanks John, but funny... several searches on that site 
  produced no relevanthits for "adaptive stochastic".Buggy/defective 
  traders.com search engine ? Could be !> -----Original 
  Message-----> From: John Hall [mailto:jrhall@xxxxxxxxxxxx]> 
  Sent: Saturday, November 10, 2001 1:05 PM> To: <A 
  href="mailto:realtraders@xxxxxxxxxxxxxxx";>realtraders@xxxxxxxxxxxxxxx> 
  Subject: RE: [RT] Digest Number 669>>> TASC. Code is on 
  the TASC web site.> John>> -----Original 
  Message-----> From: Terry [mailto:terrence@xxxxxxxxxxxxxx]> 
  Sent: Saturday, November 10, 2001 10:03 AM> To: 
  realtraders@xxxxxxxxxxxxxxx> Subject: Re: [RT] Digest Number 
  669>>> At 05:18 AM 11/10/2001, you wrote:> 
  >Message: 18> >    Date: Fri, 9 Nov 2001 14:03:40 
  -0800> >    From: "John Hall" 
  <jrhall@xxxxxxxxxxxx>> >Subject: RE: Re: Adaptive 
  Stochastic> >> >Chande published his version of an 
  adaptive stochastic last year.  July> >2000.> 
  >John>> Where?>>> To unsubscribe from 
  this group, send an email to:> 
  realtraders-unsubscribe@xxxxxxxxxxxxxxx>>>> Your 
  use of Yahoo! Groups is subject to <A 
  href="http://docs.yahoo.com/info/terms/";>http://docs.yahoo.com/info/terms/>>>> 
  To unsubscribe from this group, send an email to:> 
  realtraders-unsubscribe@xxxxxxxxxxxxxxx>>>> Your 
  use of Yahoo! Groups is subject to <A 
  href="http://docs.yahoo.com/info/terms/";>http://docs.yahoo.com/info/terms/>>To 
  unsubscribe from this group, send an email 
  to:realtraders-unsubscribe@xxxxxxxxxxxxxxxYour 
  use of Yahoo! Groups is subject to the <A 
  href="http://docs.yahoo.com/info/terms/";>Yahoo! Terms of Service. 







Yahoo! Groups Sponsor


ADVERTISEMENT









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





Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.