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)
|
Here is the fixed version of the above, I actually tested this one so I hope I did not mess up :D
{EnterLong}
EnterLong:={Buy Condition};
ProfitStop:={Profit Stop Condition};
LossStop:={Stop Loss Condition};
Status:=If(EnterLong,3,If(ProfitStop,2,If(LossStop,1,PREV)));
EL:=Cross(Status,2.5);
PS:=Status=2 AND Ref(Status,-1)=3 ;
LS:=Status=1 AND Ref(Status,-1)=3;
EL
{ProfitStop}
EnterLong:={Buy Condition};
ProfitStop:={Profit Stop Condition};
LossStop:={Stop Loss Condition};
Status:=If(EnterLong,3,If(ProfitStop,2,If(LossStop,1,PREV)));
EL:=Cross(Status,2.5);
PS:=Status=2 AND Ref(Status,-1)=3 ;
LS:=Status=1 AND Ref(Status,-1)=3;
PS
{LossStop}
EnterLong:={Buy Condition};
ProfitStop:={Profit Stop Condition};
LossStop:={Stop Loss Condition};
Status:=If(EnterLong,3,If(ProfitStop,2,If(LossStop,1,PREV)));
EL:=Cross(Status,2.5);
PS:=Status=2 AND Ref(Status,-1)=3 ;
LS:=Status=1 AND Ref(Status,-1)=3;
LS
Patrick
|