this indicator uses the Trend Advisor Diamond Phase as a 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);
D1:=If(C>Ref(Max(H,Ref(H,1)),1),Min(L,Ref(L,1)), Max(H,Ref(H,1)));
D2:=If(C<Ref(Min(L,Ref(L,1)),1),Max(H,Ref(H,1)), Min(L,Ref(L,1)));
a:=Cross(C,d1);
b:=Cross(d2,C);
Long:BarsSince(A)<BarsSince(B) & TD>0,ColorGreen;
Short:BarsSince(A)>BarsSince(B) & TD<0,ColorRed;
FillRgn(Long>0,0,Long),Brush#50008000;
FillRgn(Short>0,0,Short),Brush#50800000;
FillRgn(Long==0 & Short==0,0,1),Brush#501E90FF;
PS 2 Day range switch w TADP
Moderator: Chris White