3 median Prices in a row System w a trend filter

A forum for all EdgeRater users

Moderator: Chris White

Post Reply
henry1224
Posts: 457
Joined: Wed Feb 24, 2016 12:04 pm

3 median Prices in a row System w a trend filter

Post by henry1224 »

Here is a system with a built in filter to only allow you to trade with the trend

ML1:=MA(Close,50);
ML2:=MA(Close,200);
RecP:= If((ML1 < ML2 & Close < ML2 & Close > ML1) ,1,0),ColorLightGreen;
WarnP:= If((ML1 > ML2 & Close > ML2 & Close < ML1) ,-1,0),ColorOrange;
AcumP:= If((ML1 < ML2 & Close > ML2 & Close > ML1) ,2,0),ColorGreen;
DispP:= If((ML1 > ML2 & Close < ML2 & Close < ML1) ,-2,0),ColorRed;
BullP:= If((ML1 > ML2 & Close > ML2 & Close > ML1) ,3,0),ColorDarkGreen;
BearP:= If((ML1 < ML2 & Close < ML2 & Close < ML1),-3,0),ColorDarkRed;
TD:=(RecP + WarnP + AcumP + DispP + BullP + BearP);
Green:=MA((H+L)/2,5);
Red:=MA((H+L)/2,13);
Blue:=MA((H+L)/2,34);
D:If(Green>Red & Red>Blue & TD >0,1,If(Green<Red & Red<Blue & TD <0,-1,0)),ColorStick;

here are the events

Long

ML1:=MA(Close,50);
ML2:=MA(Close,200);
RecP:= If((ML1 < ML2 & Close < ML2 & Close > ML1) ,1,0),ColorLightGreen;
WarnP:= If((ML1 > ML2 & Close > ML2 & Close < ML1) ,-1,0),ColorOrange;
AcumP:= If((ML1 < ML2 & Close > ML2 & Close > ML1) ,2,0),ColorGreen;
DispP:= If((ML1 > ML2 & Close < ML2 & Close < ML1) ,-2,0),ColorRed;
BullP:= If((ML1 > ML2 & Close > ML2 & Close > ML1) ,3,0),ColorDarkGreen;
BearP:= If((ML1 < ML2 & Close < ML2 & Close < ML1),-3,0),ColorDarkRed;
TD:=(RecP + WarnP + AcumP + DispP + BullP + BearP);
Green:=MA((H+L)/2,5);
Red:=MA((H+L)/2,13);
Blue:=MA((H+L)/2,34);
D:=If(Green>Red & Red>Blue & TD >0,1,If(Green<Red & Red<Blue & TD <0,-1,0)),ColorStick;
Event:Cross(D,.5);

Short

ML1:=MA(Close,50);
ML2:=MA(Close,200);
RecP:= If((ML1 < ML2 & Close < ML2 & Close > ML1) ,1,0),ColorLightGreen;
WarnP:= If((ML1 > ML2 & Close > ML2 & Close < ML1) ,-1,0),ColorOrange;
AcumP:= If((ML1 < ML2 & Close > ML2 & Close > ML1) ,2,0),ColorGreen;
DispP:= If((ML1 > ML2 & Close < ML2 & Close < ML1) ,-2,0),ColorRed;
BullP:= If((ML1 > ML2 & Close > ML2 & Close > ML1) ,3,0),ColorDarkGreen;
BearP:= If((ML1 < ML2 & Close < ML2 & Close < ML1),-3,0),ColorDarkRed;
TD:=(RecP + WarnP + AcumP + DispP + BullP + BearP);
Green:=MA((H+L)/2,5);
Red:=MA((H+L)/2,13);
Blue:=MA((H+L)/2,34);
D:=If(Green>Red & Red>Blue & TD >0,1,If(Green<Red & Red<Blue & TD <0,-1,0)),ColorStick;
Event:Cross(-.5,D);
henry1224
Posts: 457
Joined: Wed Feb 24, 2016 12:04 pm

Re: 3 median Prices in a row System w a trend filter

Post by henry1224 »

Here is a system with further tightening in the filter

ML1:=MA(Close,50);
ML2:=MA(Close,200);
RecP:= If((ML1 < ML2 & Close < ML2 & Close > ML1) ,1,0),ColorLightGreen;
WarnP:= If((ML1 > ML2 & Close > ML2 & Close < ML1) ,-1,0),ColorOrange;
AcumP:= If((ML1 < ML2 & Close > ML2 & Close > ML1) ,2,0),ColorGreen;
DispP:= If((ML1 > ML2 & Close < ML2 & Close < ML1) ,-2,0),ColorRed;
BullP:= If((ML1 > ML2 & Close > ML2 & Close > ML1) ,3,0),ColorDarkGreen;
BearP:= If((ML1 < ML2 & Close < ML2 & Close < ML1),-3,0),ColorDarkRed;
TD:=(RecP + WarnP + AcumP + DispP + BullP + BearP);
Green:=MA((H+L)/2,5);
Red:=MA((H+L)/2,13);
Blue:=MA((H+L)/2,34);
D:If(Green>Red & Red>Blue & TD >1,1,If(Green<Red & Red<Blue & TD <-1,-1,0)),ColorStick;


and here is another system maxed out to the extremes in the filter

ML1:=MA(Close,50);
ML2:=MA(Close,200);
RecP:= If((ML1 < ML2 & Close < ML2 & Close > ML1) ,1,0),ColorLightGreen;
WarnP:= If((ML1 > ML2 & Close > ML2 & Close < ML1) ,-1,0),ColorOrange;
AcumP:= If((ML1 < ML2 & Close > ML2 & Close > ML1) ,2,0),ColorGreen;
DispP:= If((ML1 > ML2 & Close < ML2 & Close < ML1) ,-2,0),ColorRed;
BullP:= If((ML1 > ML2 & Close > ML2 & Close > ML1) ,3,0),ColorDarkGreen;
BearP:= If((ML1 < ML2 & Close < ML2 & Close < ML1),-3,0),ColorDarkRed;
TD:=(RecP + WarnP + AcumP + DispP + BullP + BearP);
Green:=MA((H+L)/2,5);
Red:=MA((H+L)/2,13);
Blue:=MA((H+L)/2,34);
D:If(Green>Red & Red>Blue & TD >2,1,If(Green<Red & Red<Blue & TD <-2,-1,0)),ColorStick;
Post Reply