Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
I don't think that you have used the search function of this forum http://forum.equis.com/forums/thread/33599.aspx This is my version using PowerPivots Plus Add-on Code:
TF:=Input("Time frame",1,100,1);
Off:=Input("Offset",0,100,0);
Type:=Input("1=MP,2=Typ,3=(O+H+L+C)/4,4=(O+H+L+(2*C))/5,5=C",1,5,5);
Len:=Input("Length",5,100,10);
OD:= ExtFml("PowerPivots.TDataCreate",0,TF);
HD:= ExtFml("PowerPivots.TDataCreate",1,TF);
LD:= ExtFml("PowerPivots.TDataCreate",2,TF) ;
CD:= ExtFml("PowerPivots.TDataCreate",3,TF) ;
Type2:=If(Type=1,(HD+LD)/2,If(Type=2,(HD+LD+CD)/3,If(Type=3,(OD+HD+LD+CD)/4,If(Type=4,(OD+HD+LD+(2*CD))/5,CD))));
A:=Sum(If(Type2>Ref(Type2,-1),+1,If(Type2<Ref(Type2,-1),-1,0)),Len);
A:=ExtFml( "PowerPivots.TDataLocalize", A, TF, Off);
A;
I find that in a higher time frame you will see better ob/os zones
|