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)
|
momu:=If(C>Ref(C,-1),C-Ref(C,-1),0);
momd:=If(C<Ref(C,-1),Ref(C,-1)-C,0);
A1:=Stdev(momu,100);
A2:=Stdev(momd,100);
Mup:=If(C-Ref(C,-1)>A1,C-Ref(C,-1),A1);
Mdn:=If(Ref(C,-1)-C>A2,Ref(C,-1)-C,A2);
Per1:=Input("Length of CMO",5,100,15);
Per3:=Input("Length of Sig",3,100,5);
Pk:=100*((Sum(Mup,Per1)-Sum(Mdn,Per1))
/(Sum(Mup,Per1)+Sum(Mdn,Per1)));
Per2:=100;
MN:=Mov(Pk,Per2,S);
SD:=Stdev(Pk,Per2);
Val1:=If(MN+(1.33*SD)>2.08,MN+(1.33*SD),2.08);
Val2:=If(MN-(1.33*SD)<-2.08,MN-(1.33*SD),-2.08);
LN:=If(Ref(Pk,-1)>=0 AND Pk>0,Val1,If(Ref(Pk,-1)<=0 AND Pk<0,Val2,0));
Red:=If(Ref(Pk,-1)>Pk,Pk,0);
Green:=If(Pk>Ref(Pk,-1),Pk,0);
Sig:=Mov(Pk,Per3,E);
Red;Green;LN;
Sig;
this cmo must be at least the standard deviation of momemtum up or down, I then used the same method that Cynthia Kase uses in her Peak Osc to find extremes.
this indicator plots 4 lines, change the 2 lines that crisscross the 0 line to plot as a histogram, color the rising lines green,color declining lines red
|