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)
|
You will need the powerpivots Plus Add-on for this Expert to work
Highlights
Long
TD:= ExtFml("PowerPivots.TrendDirection",1,2);
A1:=RSI(C,10);
A2:=RSI(C,20);
A3:=RSI(C,40);
UP:=If(A1>40 AND A2>40 AND A3>40,true,false);
DN:=If(A1<60 AND A2<60 AND A3<60,True,False);
D:=If(BarsSince(UP)<BarsSince(DN),-1,If(BarsSince(UP)>BarsSince(DN),1,0));
LE:=D=-1 AND Ref(D,-1)>-1 AND TD=1;
LX:=D=1 AND Ref(D,-1)<1;
SE:=D=1 AND Ref(D,-1)<1 AND TD=-1;
SX:=D=-1 AND Ref(D,-1)>-1;
B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!");
B>0
Short
TD:= ExtFml("PowerPivots.TrendDirection",1,2);
A1:=RSI(C,10);
A2:=RSI(C,20);
A3:=RSI(C,40);
UP:=If(A1>40 AND A2>40 AND A3>40,true,false);
DN:=If(A1<60 AND A2<60 AND A3<60,True,False);
D:=If(BarsSince(UP)<BarsSince(DN),-1,If(BarsSince(UP)>BarsSince(DN),1,0));
LE:=D=-1 AND Ref(D,-1)>-1 AND TD=1;
LX:=D=1 AND Ref(D,-1)<1;
SE:=D=1 AND Ref(D,-1)<1 AND TD=-1;
SX:=D=-1 AND Ref(D,-1)>-1;
B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!");
B<0
Out
TD:= ExtFml("PowerPivots.TrendDirection",1,2);
A1:=RSI(C,10);
A2:=RSI(C,20);
A3:=RSI(C,40);
UP:=If(A1>40 AND A2>40 AND A3>40,true,false);
DN:=If(A1<60 AND A2<60 AND A3<60,True,False);
D:=If(BarsSince(UP)<BarsSince(DN),-1,If(BarsSince(UP)>BarsSince(DN),1,0));
LE:=D=-1 AND Ref(D,-1)>-1 AND TD=1;
LX:=D=1 AND Ref(D,-1)<1;
SE:=D=1 AND Ref(D,-1)<1 AND TD=-1;
SX:=D=-1 AND Ref(D,-1)>-1;
B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!");
B=0
Symbols
Long Entry
TD:= ExtFml("PowerPivots.TrendDirection",1,2);
A1:=RSI(C,10);
A2:=RSI(C,20);
A3:=RSI(C,40);
UP:=If(A1>40 AND A2>40 AND A3>40,true,false);
DN:=If(A1<60 AND A2<60 AND A3<60,True,False);
D:=If(BarsSince(UP)<BarsSince(DN),-1,If(BarsSince(UP)>BarsSince(DN),1,0));
LE:=D=-1 AND Ref(D,-1)>-1 AND TD=1;
LX:=D=1 AND Ref(D,-1)<1;
SE:=D=1 AND Ref(D,-1)<1 AND TD=-1;
SX:=D=-1 AND Ref(D,-1)>-1;
B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!");
B>0 AND Ref(B,-1)<=0
Short entry
TD:= ExtFml("PowerPivots.TrendDirection",1,2);
A1:=RSI(C,10);
A2:=RSI(C,20);
A3:=RSI(C,40);
UP:=If(A1>40 AND A2>40 AND A3>40,true,false);
DN:=If(A1<60 AND A2<60 AND A3<60,True,False);
D:=If(BarsSince(UP)<BarsSince(DN),-1,If(BarsSince(UP)>BarsSince(DN),1,0));
LE:=D=-1 AND Ref(D,-1)>-1 AND TD=1;
LX:=D=1 AND Ref(D,-1)<1;
SE:=D=1 AND Ref(D,-1)<1 AND TD=-1;
SX:=D=-1 AND Ref(D,-1)>-1;
B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!");
B<0 AND Ref(B,-1)>=0
Long Exit
TD:= ExtFml("PowerPivots.TrendDirection",1,2);
A1:=RSI(C,10);
A2:=RSI(C,20);
A3:=RSI(C,40);
UP:=If(A1>40 AND A2>40 AND A3>40,true,false);
DN:=If(A1<60 AND A2<60 AND A3<60,True,False);
D:=If(BarsSince(UP)<BarsSince(DN),-1,If(BarsSince(UP)>BarsSince(DN),1,0));
LE:=D=-1 AND Ref(D,-1)>-1 AND TD=1;
LX:=D=1 AND Ref(D,-1)<1;
SE:=D=1 AND Ref(D,-1)<1 AND TD=-1;
SX:=D=-1 AND Ref(D,-1)>-1;
B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!");
B=0 AND Ref(B,-1)>0
Short exit
TD:= ExtFml("PowerPivots.TrendDirection",1,2);
A1:=RSI(C,10);
A2:=RSI(C,20);
A3:=RSI(C,40);
UP:=If(A1>40 AND A2>40 AND A3>40,true,false);
DN:=If(A1<60 AND A2<60 AND A3<60,True,False);
D:=If(BarsSince(UP)<BarsSince(DN),-1,If(BarsSince(UP)>BarsSince(DN),1,0));
LE:=D=-1 AND Ref(D,-1)>-1 AND TD=1;
LX:=D=1 AND Ref(D,-1)<1;
SE:=D=1 AND Ref(D,-1)<1 AND TD=-1;
SX:=D=-1 AND Ref(D,-1)>-1;
B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!");
B=0 AND Ref(B,-1)<0
|