M1:=5;
M2:=10;
M3:=20;
M5:MA(CLOSE,M1);
M10:MA(CLOSE,M2);
M20:MA(CLOSE,M3);
MA2:=EMA(C,2);
MA5:=EMA(C,5);
MA10:=EMA(C,10);
MA20:=EMA(C,20);
YCX:=M5>REF(M5,1);
H1:=MAX(MAX(M5,M10),M20);
L1:=MIN(MIN(M5,M10),M20);
XG:=REF(((HHV(H,20)-LLV(L,20))*100/LLV(L,20))<10,1);
一阳穿三线:= H1<C AND O<L1 AND YCX AND MA2>REF(MA2,1) AND XG;
STICKLINE(一阳穿三线,O,C,2,0),COLORYELLOW;
DRAWTEXT(一阳穿三线,L-0.1, '出击'),COLORGREEN;
C3:=REF(C,1);
涨停:=IF((C-C3)*100/C3>=(10-0.01*100/C3),1,0);
STICKLINE(涨停,OPEN,CLOSE,2,0),COLORMAGENTA;
DRAWTEXT(涨停,L-0.3, '涨停'),COLORMAGENTA;
跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);
STICKLINE(跌停,OPEN,CLOSE,2,0),COLORWHITE;
DRAWTEXT(跌停,L-0.3, '跌停'),COLORGREEN;