Page 1 of 1

Consecutive Closes over or under a MA Trend

Posted: Mon May 02, 2016 1:44 pm
by henry1224
Here are three different trends

CC_Greater_than_MA_2_15_up
Price:= (H+L)/2;
TrendUp:If(Sum(C > MA(Price,15),2)>1,1,0),colorstick;

CC_Greater_than_MA_2_15_Dn
Price:= (H+L)/2;
TrendDn:If(Sum(C < MA(Price,15),2)>1,-1,0),colorstick;

CC_Greater_than_MA_5_65_up
Price:= (H+L)/2;
TrendUp:If(Sum(C > MA(Price,65),5)>4,1,0),colorstick;

CC_Greater_than_MA_5_65_Dn
Price:= (H+L)/2;
TrendDn:If(Sum(C < MA(Price,65),5)>4,-1,0),colorstick;

CC_Greater_than_MA_5_105_up
Price:= (H+L)/2;
TrendUp:If(Sum(C > MA(Price,105),5)>4,1,0),colorstick;

CC_Greater_than_MA_5_105_Dn
Price:= (H+L)/2;
TrendDn:If(Sum(C < MA(Price,105),5)>4,-1,0),colorstick;