MA20:=MA(CLOSE,20);
MACD2:=2*(C-MA20);
UPPER:=MA20+2*STD(CLOSE,20);
LOWER:=MA20-2*STD(CLOSE,20);
UP:2*(UPPER-MA20),DOTLINE;
LO:2*(LOWER-MA20),DOTLINE;
STICKLINE(MACD2 0,0,MACD2,1.5,1),COLORMAGENTA;
STICKLINE(MACD2 0,0,MACD2,1.5,1),COLORCYAN;
DRAWTEXT(CROSS(C,LOWER),LO,' 安全');
DRAWTEXT(CROSS(UPPER,C),UP,'★风险'),COLORGREEN;
MA5:=MA(CLOSE,5);{九毛八公式指标网www.9m8.cn}
MACD1:2*(C-MA5),STICK;
STICKLINE(MACD1 0,0,MACD1,0.5,0),COLOR0000DD;
STICKLINE(MACD1 0,0,MACD1,0.5,0),COLOR00BB00;
VAR1:=MACD2 REF(MACD2,1) AND REF(MACD2,1) REF(MACD2,2) AND REF(MACD2,2) REF(MACD2,3);
VAR2:=REF(MACD1,1) 0 AND MACD1
VAR3:=MA20 REF(MA20,1);
DRAWICON(VAR1 AND VAR2 AND VAR3,0,9);