MA_1:= IF(M1 > 1, MA(CLOSE,M1), 1);
MA_2:= IF(M2 > 1, MA(CLOSE,M2), MA_1);
MA_3:= IF(M3 > 1, MA(CLOSE,M3), MA_1);
MA_4:= IF(M4 > 1, MA(CLOSE,M4), MA_1);
MA_5:= IF(M5 > 1, MA(CLOSE,M5), MA_1);
MA_6:= IF(M6 > 1, MA(CLOSE,M6), MA_1);
MAX_MA:= MAX(MA_1,MAX(MA_2,MAX(MA_3,MAX(MA_4,MAX(MA_5,MA_6)))));
MIN_MA:= MIN(MA_1,MIN(MA_2,MIN(MA_3,MIN(MA_4,MIN(MA_5,MA_6)))));
粘合度:= (MAX_MA - MIN_MA) / MIN_MA * 100;
M1均线角度:=ATAN((MA_1/REF(MA_1,1)-1) * 100)*180/3.1415926;
选股:粘合度 < 粘合度小于 AND M1均线角度 >= M1上攻角度;
============================================
均线粘合付图源代码,上一个是选股公式源代码
MA_1:= IF(M1 > 1, MA(CLOSE,M1), 1);
MA_2:= IF(M2 > 1, MA(CLOSE,M2), MA_1);
MA_3:= IF(M3 > 1, MA(CLOSE,M3), MA_1);
MA_4:= IF(M4 > 1, MA(CLOSE,M4), MA_1);
MA_5:= IF(M5 > 1, MA(CLOSE,M5), MA_1);
MA_6:= IF(M6 > 1, MA(CLOSE,M6), MA_1);
MAX_MA:= MAX(MA_1,MAX(MA_2,MAX(MA_3,MAX(MA_4,MAX(MA_5,MA_6)))));
MIN_MA:= MIN(MA_1,MIN(MA_2,MIN(MA_3,MIN(MA_4,MIN(MA_5,MA_6)))));
粘合度:= (MAX_MA - MIN_MA) / MIN_MA * 100;
M1均线角度:=ATAN((MA_1/REF(MA_1,1)-1) * 100)*180/3.1415926;
选股:=粘合度 < 粘合度小于 AND M1均线角度 >= M1上攻角度;
STICKLINE(选股, 0, 10,2,0),COLORRED;
==================================================