Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 9/8/2004(UTC) Posts: 2,266
Was thanked: 1 time(s) in 1 post(s)
|
MACD WEEKLY ON DAILY DATA:
friday:=DayOfWeek()=5;
newweek:=ROC(DayOfWeek(),1,$)<0 AND
Ref(DayOfWeek(),-1)<>5;
p1:=0.15;
p2:=0.075;
p3:=0.2;
px1:=If(friday,(p1*C)+((1-p1)*PREV),
If(newweek,(p1*Ref(C,-1))+((1-p1)*PREV),PREV));
px2:=If(friday,(p2*C)+((1-p2)*PREV),
If(newweek,(p2*Ref(C,-1))+((1-p2)*PREV),PREV));
px3:=If(friday,(p3*(px1-px2))+((1-p3)*PREV),
If(newweek,(p3*(px1-px2))+((1-p3)*PREV),PREV));
px1-px2
STOCHASTIC WEEKLY ON DAILY DATA:
fri:=DayOfWeek()=5;
new:=ROC(DayOfWeek(),1,$)<0;
next:= fri OR (new AND Ref(fri,-1)=0);
ll:=LowestSince(5,new,L);
hh:=HighestSince(5,new,H);
c1:=Cum(If(fri,(C-ll),
If(next,(Ref(C-ll,-1)),0)));
c2:=Cum(If(fri,(hh-ll),
If(next,(Ref(hh-ll,-1)),0)));
((c1-ValueWhen(4,next,c1))/
(c2-ValueWhen(4,next,c2)))*100
|