PureBytes Links
Trading Reference Links
|
Hi Roy,
Try again:
N:=Input("Weekly RSI - Close Periods",1,99,13); Pc:=1/N;
F:=Input("End of Week, 5=Friday 6=Saturday 7=Sunday",5,7,5);
Q:=Input("Display Mode, 0=Static 1=Dynamic 2=Test",0,2,2);
{0=Display, update on Friday when possible}
{1=Display, update on each new bar}
{2=Backtest, update on first bar of new week}
G:=LastValue(Highest(Sum(DayOfWeek()=F,5))=5);
I:=Fml("Calendar Week counter");
I:=Abs(I-ValueWhen(2-G,1,I)); M:=G OR I>0;
F:=G OR (DayOfWeek()=F AND I=0);
A:=LastValue(Cum(1)-1)=Cum(1);
B:=LastValue(Cum(1))=Cum(1);
J:=If(F,1,If(Alert(F,2)=0 AND M,2,0));
J:=If(A+LastValue(J)>2 OR B+(Q=1)=2,1,J);
J:=If(G,1,If(Q=2 OR Cum(J)<=1,M*2,J));
K:=ValueWhen(1,J,If(J=1,H,ValueWhen(2-G,1,H)));
K:=ValueWhen(1,K>0,K);
K1:=ValueWhen(1,J,If(J=1,L,ValueWhen(2-G,1,L)));
K1:=ValueWhen(1,K1>0,K1);
Ua:=ValueWhen(1,J>0,K); Da:=ValueWhen(2,J>0,K);
Ua1:=ValueWhen(1,J>0,K1); Da1:=ValueWhen(2,J>0,K1);
Ub:=If(Ua>Da,Ua-Da,0); Db:=If(Ua1<Da1,Da1-Ua1,0);
A:=Cum((j>0)*Ub);
B:=Cum((j>0)*Db);
X:=(A-ValueWhen(N+1,J,A))/N;
Y:=(B-ValueWhen(N+1,J,B))/N;
X/X+Y
Its beginning to look like the original indicator if I invert the Y scale!
Norman
------------------------ Yahoo! Groups Sponsor --------------------~-->
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/zMEolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Metastockusers/
<*> To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|