Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/7/2005(UTC) Posts: 1,346
|
hey virginatrader.... added the v and oi along with some playing around with 'Cum(If(H-O>Ref(O-L,-pds ),1,If(H-O<Ref(O-L,-pds),-1,0)));' ..... something else that would be handy might be adding the date range funtion.... esp if it would count between those dates and not from the begining of the chart and start a 0.... will study on it more.....h
pds:=Input("periods",1,100,1);
pnt:=Input("C=1, O=2, H=3, L=4, 5=gapup, 6=gapdown, 7=5-6",1,12,1);
blank:=Input("8= sum (H-O)<>(O-L) , 9=V, 10=OI, 11=(H-O)-(O-L) ",0,0,0);
pds2:=Input("moving average periods",1,100,10);
a:=Cum(If(C>Ref(C,-pds ),1,If(C<Ref(C,-pds),-1,0)));
b:=Cum(If(O>Ref(O,-pds ),1,If(O<Ref(O,-pds),-1,0)));
aa:=Cum(If(H>Ref(H,-pds ),1,If(H<Ref(H,-pds),-1,0)));
bb:=Cum(If(L>Ref(L,-pds ),1,If(L<Ref(L,-pds),-1,0)));
aaa:=Cum(If(O>Ref(C,-pds ),1,0));
bbb:=Cum(If(O<Ref(C,-pds ),1,0));
aaaa:=aaa-bbb;
bbbb:=Cum(If(H-O>Ref(O-L,-pds ),1,If(H-O<Ref(O-L,-pds),-1,0)));
aaaaa:=Cum((H-O) - (O-L));
d:=Cum(If(V>Ref(V,-pds ),1,If(V<Ref(V,-pds),-1,0)));
dd:=Cum(If(OI>Ref(OI,-pds ),1,If(OI<Ref(OI,-pds),-1,0)));
plot:=If(pnt=1,a,If(pnt=2,b,If(pnt=3,aa,If(pnt=4,bb,If(pnt=5,aaa,If(pnt=6,bbb,If(pnt=7,aaaa, If(pnt=8,bbbb,If(pnt=9,d,If(pnt=10,dd,If(pnt=11,aaaaa,a)))))))))));
plot;
Mov(plot,pds2,S)
-------------------------------------------------------------
|