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

[RT] MY Realtime + Adaptive Stochastic FUNCTION



PureBytes Links

Trading Reference Links


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
 
 
 
<FONT face="Courier New" 
size=2>{********************************************************************************TRADESTATION 
CODE FOR ADAPTIVE STOCHASTIC OSCILLATOR(c) 2K Tushar Chande; Adaptive 
Stochastic Oscillator 
 
Function:  
Adaptive_StochasticReturn:    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: <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- - - - 
- - - - - - - - - - - - - - - -  - - - - - - - 
-



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.



Attachment: Description: "ADAPSTOF.ELA"

Attachment: Description: "junk2.gif"