Rank: Advanced Member
Groups ready for retrieval: Registered, Registered Users, Subscribers Joined: 9/8/2004(UTC) Posts: 2,266
Was thanked: 1 time(s) in 1 post(s)
|
Try this ... Now if it does not work tell me what chart you tried it on, what periodicity, how much data you have loaded and why it's wrong ... maybe the date and time it was wrong even.
{Enter Long}
speling:= 0.02;
eind:=19;
EL:=Cross( mov(c,3,s),Mov(C, 150, S)+speling ) and (C > Mov(C, 15, S)-speling) and hour() <=eind;
XL:=C<Mov(C, 15, S)-0.02 or (minute() = 55 and hour() = eind-1);
ES:=Cross(Mov(C, 150, S)-speling , mov(c,3,s) ) and c < Mov(C, 15, S)+speling and hour() <=eind;
XS:=C>Mov(C, 15, S)+speling or (minute() = 55 and hour() = eind-1);
status:=If(EL,2,If(XL,1,If(ES,-2,If(XS,-1,PREV))));
FEL:=Cross(Status,1.5);
FXL:=Cross(1.5,Status) AND Ref(Status,-1)=2;
FES:=Cross(-1.5,Status);
FXS:=Cross(Status,-1.5) AND Ref(Status,-1)=-2;
FEL
{Exit Long}
speling:= 0.02;
eind:=19;
EL:=Cross( mov(c,3,s),Mov(C, 150, S)+speling ) and (C > Mov(C, 15, S)-speling) and hour() <=eind;
XL:=C<Mov(C, 15, S)-0.02 or (minute() = 55 and hour() = eind-1);
ES:=Cross(Mov(C, 150, S)-speling , mov(c,3,s) ) and c < Mov(C, 15, S)+speling and hour() <=eind;
XS:=C>Mov(C, 15, S)+speling or (minute() = 55 and hour() = eind-1);
status:=If(EL,2,If(XL,1,If(ES,-2,If(XS,-1,PREV))));
FEL:=Cross(Status,1.5);
FXL:=Cross(1.5,Status) AND Ref(Status,-1)=2;
FES:=Cross(-1.5,Status);
FXS:=Cross(Status,-1.5) AND Ref(Status,-1)=-2;
FXL
{Enter Short}
speling:= 0.02;
eind:=19;
EL:=Cross( mov(c,3,s),Mov(C, 150, S)+speling ) and (C > Mov(C, 15, S)-speling) and hour() <=eind;
XL:=C<Mov(C, 15, S)-0.02 or (minute() = 55 and hour() = eind-1);
ES:=Cross(Mov(C, 150, S)-speling , mov(c,3,s) ) and c < Mov(C, 15, S)+speling and hour() <=eind;
XS:=C>Mov(C, 15, S)+speling or (minute() = 55 and hour() = eind-1);
status:=If(EL,2,If(XL,1,If(ES,-2,If(XS,-1,PREV))));
FEL:=Cross(Status,1.5);
FXL:=Cross(1.5,Status) AND Ref(Status,-1)=2;
FES:=Cross(-1.5,Status);
FXS:=Cross(Status,-1.5) AND Ref(Status,-1)=-2;
FES
{Exit Short}
speling:= 0.02;
eind:=19;
EL:=Cross( mov(c,3,s),Mov(C, 150, S)+speling ) and (C > Mov(C, 15, S)-speling) and hour() <=eind;
XL:=C<Mov(C, 15, S)-0.02 or (minute() = 55 and hour() = eind-1);
ES:=Cross(Mov(C, 150, S)-speling , mov(c,3,s) ) and c < Mov(C, 15, S)+speling and hour() <=eind;
XS:=C>Mov(C, 15, S)+speling or (minute() = 55 and hour() = eind-1);
status:=If(EL,2,If(XL,1,If(ES,-2,If(XS,-1,PREV))));
FEL:=Cross(Status,1.5);
FXL:=Cross(1.5,Status) AND Ref(Status,-1)=2;
FES:=Cross(-1.5,Status);
FXS:=Cross(Status,-1.5) AND Ref(Status,-1)=-2;
FXS
|