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)
|
Highlights tab
Long
PK:=(LinearReg(C,13)/Ref(LinearReg(C,13),-13))-1;
Green:=If(PK>Ref(PK,-1),PK,0);
Red:=If(PK<Ref(PK,-1),PK,0);
EL:=If(PK>0,
(Ref(Green,-2)>Ref(Red,-2) AND
Ref(Green,-1)<Ref(Red,-1) AND Green>Red) OR
(Ref(Green,-2)<Ref(Red,-2) AND
Ref(Green,-1)<Ref(Red,-1) AND Green>Red)
,If(PK<0,
Ref(Green,-2)>Ref(Red,-2) AND Ref(Green,-1)<Ref(Red,-1) AND Green<Red,0)) OR Cross(PK,0);
ES:=If(PK>0,
Ref(Green,-2)>Ref(Red,-2) AND Ref(Green,-1)<Ref(Red,-1) AND Green<Red,If(PK<0,
(Ref(Green,-2)>Ref(Red,-2) AND
Ref(Green,-1)<Ref(Red,-1) AND Green>Red) OR
(Ref(Green,-2)<Ref(Red,-2) AND
Ref(Green,-1)<Ref(Red,-1) AND Green>Red),0)) OR Cross(0,PK);
State:=If(BarsSince(EL)>BarsSince(ES),1,0);
State=0
Short
PK:=(LinearReg(C,13)/Ref(LinearReg(C,13),-13))-1;
Green:=If(PK>Ref(PK,-1),PK,0);
Red:=If(PK<Ref(PK,-1),PK,0);
EL:=If(PK>0,
(Ref(Green,-2)>Ref(Red,-2) AND
Ref(Green,-1)<Ref(Red,-1) AND Green>Red) OR
(Ref(Green,-2)<Ref(Red,-2) AND
Ref(Green,-1)<Ref(Red,-1) AND Green>Red)
,If(PK<0,
Ref(Green,-2)>Ref(Red,-2) AND Ref(Green,-1)<Ref(Red,-1) AND Green<Red,0)) OR Cross(PK,0);
ES:=If(PK>0,
Ref(Green,-2)>Ref(Red,-2) AND Ref(Green,-1)<Ref(Red,-1) AND Green<Red,If(PK<0,
(Ref(Green,-2)>Ref(Red,-2) AND
Ref(Green,-1)<Ref(Red,-1) AND Green>Red) OR
(Ref(Green,-2)<Ref(Red,-2) AND
Ref(Green,-1)<Ref(Red,-1) AND Green>Red),0)) OR Cross(0,PK);
State:=If(BarsSince(EL)>BarsSince(ES),1,0);
State=1
Symbol tab
Long
PK:=(LinearReg(C,13)/Ref(LinearReg(C,13),-13))-1;
Green:=If(PK>Ref(PK,-1),PK,0);
Red:=If(PK<Ref(PK,-1),PK,0);
EL:=If(PK>0,
(Ref(Green,-2)>Ref(Red,-2) AND
Ref(Green,-1)<Ref(Red,-1) AND Green>Red) OR
(Ref(Green,-2)<Ref(Red,-2) AND
Ref(Green,-1)<Ref(Red,-1) AND Green>Red)
,If(PK<0,
Ref(Green,-2)>Ref(Red,-2) AND Ref(Green,-1)<Ref(Red,-1) AND Green<Red,0)) OR Cross(PK,0);
ES:=If(PK>0,
Ref(Green,-2)>Ref(Red,-2) AND Ref(Green,-1)<Ref(Red,-1) AND Green<Red,If(PK<0,
(Ref(Green,-2)>Ref(Red,-2) AND
Ref(Green,-1)<Ref(Red,-1) AND Green>Red) OR
(Ref(Green,-2)<Ref(Red,-2) AND
Ref(Green,-1)<Ref(Red,-1) AND Green>Red),0)) OR Cross(0,PK);
State:=If(BarsSince(EL)>BarsSince(ES),1,0);
State< Ref(State,-1)
Short
PK:=(LinearReg(C,13)/Ref(LinearReg(C,13),-13))-1;
Green:=If(PK>Ref(PK,-1),PK,0);
Red:=If(PK<Ref(PK,-1),PK,0);
EL:=If(PK>0,
(Ref(Green,-2)>Ref(Red,-2) AND
Ref(Green,-1)<Ref(Red,-1) AND Green>Red) OR
(Ref(Green,-2)<Ref(Red,-2) AND
Ref(Green,-1)<Ref(Red,-1) AND Green>Red)
,If(PK<0,
Ref(Green,-2)>Ref(Red,-2) AND Ref(Green,-1)<Ref(Red,-1) AND Green<Red,0)) OR Cross(PK,0);
ES:=If(PK>0,
Ref(Green,-2)>Ref(Red,-2) AND Ref(Green,-1)<Ref(Red,-1) AND Green<Red,If(PK<0,
(Ref(Green,-2)>Ref(Red,-2) AND
Ref(Green,-1)<Ref(Red,-1) AND Green>Red) OR
(Ref(Green,-2)<Ref(Red,-2) AND
Ref(Green,-1)<Ref(Red,-1) AND Green>Red),0)) OR Cross(0,PK);
State:=If(BarsSince(EL)>BarsSince(ES),1,0);
State>Ref(State,-1)
|