Page 1 of 1

PS Bull Power Bear Power 4

Posted: Fri Jul 29, 2016 12:59 pm
by henry1224
bear1:=(L-EMA(C,13))>Ref((L-EMA(C,13)),1) & Ref((L-EMA(C,13)),1)<Ref((L-EMA(C,13)),2);
bull1:=(H-EMA(C,13))<Ref((H-EMA(C,13)),1) & Ref((H-EMA(C,13)),1)>Ref((H-EMA(C,13)),2);
Val1:= Ref((L-EMA(C,13)),1);
Val2:= Ref((H-EMA(C,13)),1);
A:=ValueWhen(Val1,bear1,1) > ValueWhen(Val1,Bear1,2) & BarsSince(bear1)<BarsSince(bull1);
B:= ValueWhen(Val2,Bull1,1) < ValueWhen(Val2,Bull1,2) & BarsSince(bear1)>BarsSince(bull1);
Long:BarsSince(A)<BarsSince(B),ColorGreen;
Short:BarsSince(A)>BarsSince(B),ColorRed;
FillRgn(Long>0,0,Long),Brush#50008000;
FillRgn(Short>0,0,Short),Brush#50800000;