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

Re: William Blau



PureBytes Links

Trading Reference Links



--- Plastodon@xxxxxxx wrote:
> Does anyone have the Metastock code for all of the
> indicators mentioned by 
> Bill Blau in his book Momentum, Direction, and
> Divergence?  They don't seem 
> to be on the metastock site.

Here are 3 I translated for my personal use...

STOCHASTIC MOMENTUM INDEX...
qq:= Input("lookback q" ,1, 100, 25);
rr:= Input("first smoothing r" ,1 ,100 ,13 );
ss:= Input("second smoothing s" ,1 ,100 ,1 );
uu:= Input("third smoothing u", 1,100,1);

value1:=(CLOSE-(.5*(HHV(HIGH ,qq )+ LLV(LOW ,qq ))));

value2:=(HHV(HIGH ,qq )- LLV(LOW ,qq ));

Numerator:= Mov(Mov(Mov(value1,rr,E),ss,E),uu,E);

Denominator:=.5* Mov(Mov(Mov(value2,rr,E),ss,E),uu,E);

If(Denominator <>0,(100*(Numerator/Denominator)),0 );

TRUE STRENGTH INDEX...
rr:= Input("first smoothing r" ,1 ,100 ,25 );
ss:= Input("second smoothing s" ,1 ,100 ,13 );
uu:= Input("third smoothing u",1,100,1);

numerator:=100*(Mov(Mov(Mov(ROC(C,1,$),rr,E),ss,E),uu,E));

denominator:=Mov(Mov(Mov(Abs(ROC(C,1,$)),rr,E),ss,E),uu,E);

If(denominator<>0,numerator/denominator,0);


DIRECTIONAL TREND INDEX...
HMU:=If((HIGH-Ref(HIGH,-1))>0 ,(HIGH-Ref(HIGH,-1)),0 );

LMU:=If((LOW-Ref(LOW,-1))<0 ,-(LOW-Ref(LOW,-1)),0 );

Result:=HMU-LMU;

rr:= Input("first smoothing r" ,1 ,100 ,25 );
ss:= Input("second smoothing s" ,1 ,100 ,13 );
uu:= Input("third smoothing u" ,1,100,1);

Numerator:= 100*Mov(Mov(Mov(Result,rr,E),ss,E),uu,E);

Denominator:= Mov(Mov(Mov((Abs(Result)),rr,E),ss,E),uu,E);

If(Denominator<>0 ,Numerator/Denominator ,0 );




__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com