Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 8/16/2005(UTC) Posts: 182
|
minnamor wrote:
Does this come close to your results?
Plot:=Input("[1] sys1,[2] sys2,[3] sys",1,3,1);
LE1:= C<BBANDTOP(TYP(),20,S,2) AND Ref(C<BBANDTOP(TYP(),20,S,2) ,-4) AND Sum(C>BBANDTOP(TYP(),20,S,2) ,4)<=3 AND Sum(C>BBANDTOP(TYP(),20,S,2) ,4)>=1;; SE1:= C>BBANDBOT(TYP(),20,S,2) AND Ref(C>BBANDBOT(TYP(),20,S,2) ,-4) AND Sum(C<BBANDBOT(TYP(),20,S,2) ,4)<=3 AND Sum(C<BBANDBOT(TYP(),20,S,2) ,4)>=1; LX1:= H>=BBANDTOP(TYP(),20,S,2) ; SX1:= L<=BBANDBOT(TYP(),20,S,2) ;
B1:=ExtFml("PowerPivots.SysEval",LE1,LX1,SE1,SX1,"!@#$#@!"); State1:=If(B1>0,1,If(B1<0,-1,0));
LE2:= BarsSince(SE1)<=5 AND C>=Ref(HHV(H,10),-1); SE2:= BarsSince(LE1)<=5 AND C<=Ref(LLV(L,10),-1); LX2:= Cross(HHV(H-2.5*ATR(5),10), C ); SX2:= Cross(C, LLV(L+2.5*ATR(5),10));
B2:=ExtFml("PowerPivots.SysEval",LE2,LX2,SE2,SX2,"!@#$#@!"); State2:=If(B2>0,1,If(B2<0,-1,0));
LE:= LE1 OR LE2; SE:= SE1 OR SE2; LX:= If(BarsSince(LE1)>BarsSince(LE2),LX1,LX2); SX:= If(BarsSince(SE1)>BarsSince(SE2),SX1,SX2);
B:=ExtFml("PowerPivots.SysEval",LE,LX,SE,SX,"!@#$#@!"); State:=If(B>0,1,If(B<0,-1,0)); If(Plot=1,state1,if(Plot=2,state2,State))
Thanks for your work, I will try it when I am back from a short holiday from Thailand. BTY, can I use Forum Latch instead of PP+?
Sa
|