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)
|
To create this expert, you have to create 2 custom indicators first
{Countbacklines buy}
Days:=10;
BV:=If(L>LLV(L,Days),PREV,
If(Ref(H,-2)>Ref(H,-1) AND Ref(H,-1)>H,Ref(H,-2),
If(Ref(H,-3)>HHV(H,3) AND Alert(Ref(H,-1)>H,2),Ref(H,-3),
If(Ref(H,-4)>HHV(H,4) AND Alert(Ref(H,-1)>H,3),Ref(H,-4),
If(Ref(H,-5)>HHV(H,5) AND Alert(Ref(H,-1)>H,4),Ref(H,-5),
PREV)))));
BV;
{Countbacklines Sell}
Days:=10;
SV:=If(H<HHV(H,Days),PREV,
If(Ref(L,-2)<Ref(L,-1) AND Ref(L,-1)<L,Ref(L,-2),
If(Ref(L,-3)<LLV(L,3) AND Alert(Ref(L,-1)<L,2),Ref(L,-3),
If(Ref(L,-4)<LLV(L,4) AND Alert(Ref(L,-1)<L,3),Ref(L,-4),
If(Ref(L,-5)<LLV(L,5) AND Alert(Ref(L,-1)<L,4),Ref(L,-5),
PREV)))));
SV;
Now for the expert
under the highlight tab
Long
Buy:=Cross(C, Fml( "Countbacklines buy"));
Sell:=Cross(Fml( "Countbacklines Sell"),C);
D:=If(BarsSince(Buy)<BarsSince(Sell),-1, If(BarsSince(Buy)>BarsSince(Sell),1,0));
D=-1
Short
Buy:=Cross(C, Fml( "Countbacklines buy"));
Sell:=Cross(Fml( "Countbacklines Sell"),C);
D:=If(BarsSince(Buy)<BarsSince(Sell),-1, If(BarsSince(Buy)>BarsSince(Sell),1,0));
D=1
now under the symbol tab
EL
Buy:=Cross(C, Fml( "Countbacklines buy"));
Sell:=Cross(Fml( "Countbacklines Sell"),C);
D:=If(BarsSince(Buy)<BarsSince(Sell),-1, If(BarsSince(Buy)>BarsSince(Sell),1,0));
D=-1 AND Ref(D,-1)>-1
ES
Buy:=Cross(C, Fml( "Countbacklines buy"));
Sell:=Cross(Fml( "Countbacklines Sell"),C);
D:=If(BarsSince(Buy)<BarsSince(Sell),-1, If(BarsSince(Buy)>BarsSince(Sell),1,0));
D=1 AND Ref(D,-1)<1
|