M1:=4;
M2:=4;
M3:=13;
M4:=4;
HJ_1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
HJ_2:=REF(HJ_1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
HJ_3:=REF(HJ_2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
HJ_4:=REF(HJ_3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
HJ_5:=REF(HJ_4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
HJ_6:=REF(HJ_5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
HJ_7:=REF(HJ_6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
HJ_8:=REF(HJ_7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
HJ_9:=REF(HJ_8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
HJ_10:=REF(HJ_9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
HJ_11:=REF(HJ_10,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
HJ_12:=REF(HJ_11,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
HJ_13:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
HJ_14:=REF(HJ_13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
HJ_15:=REF(HJ_14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
HJ_16:=REF(HJ_15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
HJ_17:=REF(HJ_16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
HJ_18:=REF(HJ_17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
HJ_19:=REF(HJ_18,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
HJ_20:=REF(HJ_19,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
HJ_21:=REF(HJ_20,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
HJ_22:=REF(HJ_21,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
HJ_23:=REF(HJ_22,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
HJ_24:=REF(HJ_23,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
HJ_25:=REF(HJ_13 OR HJ_14 OR HJ_15 OR HJ_16 OR HJ_17 OR HJ_18 OR HJ_19 OR HJ_20 OR HJ_21 OR HJ_22 OR HJ_23 OR HJ_24,1) AND HJ_1;
HJ_26:=REF(HJ_1 OR HJ_2 OR HJ_3 OR HJ_4 OR HJ_5 OR HJ_6 OR HJ_7 OR HJ_8 OR HJ_9 OR HJ_10 OR HJ_11 OR HJ_12,1) AND HJ_13;
DRAWTEXT(FILTER(HJ_25=1,5),LOW,1),COLORMAGENTA;{非同花顺清除}
DRAWICON(FILTER(HJ_25=1,5),LOW,9);
bbi:(MA(CLOSE,M1)+MA(CLOSE,M2)+MA(CLOSE,M3)+MA(CLOSE,M4))/4;
MA3:MA(CLOSE,M3);