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

[RT] RE: Adaptive Stochastic



PureBytes Links

Trading Reference Links

Dan,

Here you go. The code is not mine, I'd be willing to give credit for it -
but can't remember where I found it:-((

All the best,
Yarroll

****

{Adaptive Stochastic}

lenmax:= 28;
lenmin:= 7;
currlen:= 0;
v1:= Stdev(CLOSE, 20);
v2:= HHV(v1,20);
v3:= LLV(v1,20);
v4:=If((v2-v3)>0,((v1 - v3)/(v2-v3)),0);
currlen:= If(v4=1,lenmin,(Int(lenmin + (lenmax-lenmin)*(1-v4))));
hh:= HHV(HIGH, 9);
ll:= LLV(LOW, 9);
sto:=If(((hh-ll)>0),((CLOSE - ll)/(hh - ll)) * 100,50)
{I set the error condition to a stochastic midpoint...I'm open to any
other ideas???} ;
stoma:= (.4 * sto) + (.3 * Ref(sto,-1)) + (.3 * Ref(sto,-2));
sto;{ stoma; 80; 20; }


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/