波段起点
{均线粘合选股}
MA1:=MA(CLOSE,5);
MA2:=MA(CLOSE,60);
MA3:=MA(CLOSE,89);
最大:=MAX(MAX(MA1,MA2),MA3);
最小:=MIN(MIN(MA1,MA2),MA3);
比值:=(最大/最小-1)*100;
NIANH:=比值<=5 AND MA1>=MA2*0.97 AND MA1>=REF(MA1,1) AND MA2>=REF(MA2,1)
AND MA3>=REF(MA3,1);
均线粘合:IF(NIANH,0.6,0),DOTLINE,COLORYELLOW,LINETHICK4;
{波段起点}
DIF:=EMA(CLOSE,10)-EMA(CLOSE,23);
DEA:=EMA(DIF,8);
MACD:=(DIF-DEA)*40;
XG1:=(REF(MACD,1)<REF(MACD,2) AND MACD>0 AND MACD>REF(MACD,1)) OR (MACD>0 AND REF(MACD,1)<0);
A5:=MA(C,5);
A10:=MA(C,10);
A20:=MA(C,21);
A45:=MA(C,45);
A60:=MA(C,60);
A90:=MA(C,90);
VAR1:=COUNT(MAX(MAX(A5,A10),A20)/MIN(MIN(A5,A10),A20)<1.08,5)>=3;
VAR2:=A5>=A10 AND A10>A20 AND A20>A45 AND A5>=REF(A5,1) AND A10>REF(A10,1)
AND A20>=REF(A20,1) AND A45>=REF(A45,1) AND C>A5;
XG2:=VAR1 AND VAR2;
CJL:=V>MA(V,5) AND V>MA(V,20);
波段:CJL AND NOT(REF(CJL,1)) AND C>O AND C>A5 AND A20>REF(A20,1) AND
C>A5 AND C>A10 AND C>A20 AND VAR1 AND A60>REF(A60,1) AND A90>REF(A90,1)
AND C>A60 AND C>A90,COLORMAGENTA;