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

[EquisMetaStock Group] Re: Statistical Median



PureBytes Links

Trading Reference Links

--- In equismetastock@xxxxxxxxxxxxxxx, "Dusant" <dusant@xxxx> wrote:
> Maurizio Neri,
> The code is fine. How about some words on how to use it. That would
be rather helpful.
> Dusant
> Chief Architect
> http://www.candlestrength.com/

Thanks Dusant,
a little fix-up and improvment in version 1.1; to view saple chart visit:

http://www.finanzaonline.com/forum/showthread.php?s=db2fb32577776bf17c439b4b9f8a07fa&threadid=450310&perpage=15&pagenumber=2

How to use it?
Hummm... ;^)

Regards,
maurizio

The revised code:

{ ****** (c) Maurizio Neri - 04/2004  ****** }
{ maurizio.neri@******                       }
{ Empirical Volume Average for Metastock v1.1}



plot:=Input("Plot type: Vol Distibution[1], VolAvg[2]",1,2,2);

{ Assign Bins Sizing}
B:=LastValue(Highest(V)/15);
Nb:=Cum(1);

{ Loop to measure empirical distribution}
X:=0;
S1:=100*Cum(V>=X*B AND V<(X+1)*B)/Nb;
X:=X+1;
S2:=100*Cum(V>=X*B AND V<(X+1)*B)/Nb;
X:=X+1;
S3:=100*Cum(V>=X*B AND V<(X+1)*B)/Nb;
X:=X+1;
S4:=100*Cum(V>=X*B AND V<(X+1)*B)/Nb;
X:=X+1;
S5:=100*Cum(V>=X*B AND V<(X+1)*B)/Nb;
X:=X+1;
S6:=100*Cum(V>=X*B AND V<(X+1)*B)/Nb;
X:=X+1;
S7:=100*Cum(V>=X*B AND V<(X+1)*B)/Nb;
X:=X+1;
S8:=100*Cum(V>=X*B AND V<(X+1)*B)/Nb;
X:=X+1;
S9:=100*Cum(V>=X*B AND V<(X+1)*B)/Nb;
X:=X+1;
S10:=100*Cum(V>=X*B AND V<(X+1)*B)/Nb;
X:=X+1;
S11:=100*Cum(V>=X*B AND V<(X+1)*B)/Nb;
X:=X+1;
S12:=100*Cum(V>=X*B AND V<(X+1)*B)/Nb;
X:=X+1;
S13:=100*Cum(V>=X*B AND V<(X+1)*B)/Nb;
X:=X+1;
S14:=100*Cum(V>=X*B AND V<(X+1)*B)/Nb;
X:=X+1;
S15:=100*Cum(V>=X*B AND V<(X+1)*B)/Nb;

{ Restrict evaluation & plots to last 15 bars }
X:=(1+Nb-ValueWhen(1,Ref(Nb,-1)+15=LastValue(Nb),Nb));

{ Assign at each of last 15 bar a "bin" value}
K:=If(X=1,S1, If(X=2,S2, If(X=3,S3, If(X=4,S4,
 If(X=5,S5, If(X=6,S6, If(X=7,S7,
If(X=8,S8, If(X=9,S9, If(X=10,S10, If(X=11,S11,
 If(X=12,S12, If(X=13,S13, If(X=14,S14, If(X=15,S15, 0)))))))))))))));

{Select plot type and go}
If(Plot=1,K, {Volume Distribution}
ValueWhen(1,K=Highest(K),(X-.5)*B){VolRange Avg=>Line});
If(Plot=2,If(X>0,X*B,0){Bin slot=> Dotted},0);

{Show Mean value of Volume}
If(Plot=2,Cum(V)/Nb,0)






------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com.  Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/BefplB/TM
---------------------------------------------------------------------~->

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
     equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/