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

[RT] Re: MY Realtime + Adaptive Stochastic FUNCTION



PureBytes Links

Trading Reference Links

Clyde,

Many thanks for offering up your Adaptive Stoch function.  Perhaps 
I'm confused, but does the input "ALengMul" in your function 
correspond to the multiplier "K" in the indicator provided by Bob?  
Thus, should the one statement read as "currlen = ALengMul*IntPortion
(HilbertPeriod(Price));" or is the intention something different?

Thanks,
Mark

--- In realtraders@xxxx, Clyde Lee <clydelee@xxxx> wrote:
> If you don't care about what my realtime looks like, then
> 
> The bottom indicator is a CUSTOM 3 LINES indicator which uses the
> Adaptive_Stochastic  function output as the first input and then
> the 30 and 70 reference lines.
> 
> This function can provide you with some powerful input to a system
> or to your own indicator.
> 
> As you will note below  John Hall  started this mess and  BobR  (as 
usual)
> conned me into dressing this up a bit.  
> 
> Please, this function could be really important to you and thank 
John and Bob
> for their insistence.
> 
> If you prefer Larry Williams concept of this same Idea then you can 
have it!!!!
> 
> Clyde
> 
> 
> 
> 
{*********************************************************************
***********
> TRADESTATION CODE FOR ADAPTIVE STOCHASTIC OSCILLATOR
> (c) 2K Tushar Chande; Adaptive Stochastic Oscillator 
> 
> Function:  Adaptive_Stochastic
> Return:    Smoothed (if LengSmo>0) value for Stochastic based
>            on a length determined internally.
>  
> History:
>  6/20/01 - changed how adaptive length is calculated.(John Hall)
>  6/27/01 - CL: Added smoothing mode Avg, XAvg, T3Avg
>            CL: Added option to compute Williams %R
>  
> 
**********************************************************************
***********}
>  
> Inputs: Price(numericseries),      {Price value to use in 
computation    } 
>         ALengMul(numeric),         {Multiplier for auto length 
determined}
>         LengSmo(numeric),          {Length for smoothing 
operation       }
>         SMode(Numeric),            {1=Avg, 2=XAvg, 
3=T3Avg               }
>         MakeWmPR(truefalse);       {Make output Williams % R 
computation }
> 
> vars: currlen(9), hh(0), ll(0), stoch(0), stochma(0) ;
>  
> {--- Calculate current effective length ---}
>  
>  currlen = IntPortion(HilbertPeriod(Price));
>  
> {--- 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 
>   else stoch = 50;
> 
>  if currentbar = 1 or LengSmo<=0 then Stochma = stoch 
>    else If SMode<2 then StochMa=Average(Stoch,LengSmo)
>    else If SMode=2 then StochMa=xAverage(Stoch,LengSmo)
>    else If SMode=3 then StochMa=T3Average(Stoch,LengSmo);
> 
>  if MakeWmPR then StochMa=100-StochMa;
> 
>  Adaptive_Stochastic = StochMa;
> 
> - - - - - - - - - - - - - - - - - - - - -  - - - - - - -
> Clyde Lee   Chairman/CEO          (Home of SwingMachine)
> SYTECH Corporation          email: clydelee@xxxx  
> 7910 Westglen, Suite 105       Office:    (713) 783-9540
> Houston,  TX  77063               Fax:    (713) 783-1092
> Details at:                      www.theswingmachine.com
> - - - - - - - - - - - - - - - - - - - -  - - - - - - - -


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/