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)
|
Per1:=Input("max length",10,100,30);
RWH:=(H-Ref(L,-Per1))/(ATR(Per1)*Sqrt(Per1));
RWL:=(Ref(H,-Per1)-L)/(ATR(Per1)*Sqrt(Per1));
Pk:=Mov((RWH-RWL),3,W);
MN:=Mov(Pk,Per1,S);
SD:=Stdev(Pk,Per1);
Val1:=Max(MN+(1.33*SD),2.08);
Val2:=Min(MN-(1.33*SD),-2.08);
Val3:=Max(MN+(.33*SD),1.08);
Val4:=Min(MN-(.33*SD),-1.08);
LN1:=If(PK>=0,Val1,Val2);
LN2:=If(PK>=0,Val3,Val4);
Red:=If(Ref(Pk,-1)>Pk,Pk,0);
Green:=If(Pk>Ref(Pk,-1),Pk,0);
Red;Green;LN1;LN2;
|