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;
{5日均线}
MA5:=MA(CLOSE,5);
MACD1:2*(C-MA5),STICK;
{收盘价与5日均线关系(大于或小于5日均线)}
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 {收盘价上穿5日均线,也可以写成CROSS(C,MACD1);}
VAR3:=MA20 REF(MA20,1){20日均线向上};
DRAWICON(VAR1 AND VAR2 AND VAR3,0,9);{回踩买(钱袋标志)};
DIF*10,COLOR0000FF;
DEA*10,COLORBLUE;