EXP12:=EMA(CLOSE,12);EXP26:=EMA(CLOSE,26);EMA草飘带
RAWBAND(EXP12,RGB(100,0,0),EXP26,RGB(0,100,0));DRAWKLINE(HIGH,OPEN,LOW,CLOSE);STICKLINE(CLOSE> REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORRED; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,3.1,0 ),COLOR000033;STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR000066; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR000099;STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLOR0000CC;STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLOR0000FF;STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORCC66FF;STICKLINE(CLOSE< REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORCYAN;STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,3.1,0 ),COLOR990000;STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLORCC0000; STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLORFF4400;STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORFF8800;STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORFFCC00;STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORCYAN;STICKLINE(CLOSE= REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORWHITE;STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,3.1,0 ),COLOR555555;STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR777777; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR999999;STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORBBBBBB;STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORDDDDDD;STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORFFFFFF;MID:MA(CLOSE,20),LINETHICK2;UPPER:MID+1.2*STD(CLOSE,20),LINETHICK2;LOWER:MID-1.2*STD(CLOSE,20),LINETHICK2;MA60:MA(C,60),LINETHICK2;DRAWICON(CURRBARSCOUNT=20,H*1.03,38);DRAWICON(CURRBARSCOUNT=60,H*1.03,14);{涨跌停K线标识};前5天:=BARSCOUNT(C)>5;{上市大于五天,前五天不限制幅度}ZC:=REF(C,1);ZF:=(H-ZC+0.01)/ZC*100;DF:=(ZC-L+0.01)/ZC*100;涨5:=ZF>=5 AND 前5天 AND C=H;跌5:=DF>=5 AND 前5天 AND C=L;涨10:=ZF>=10 AND 前5天 AND C=H;跌10:=DF>=10 AND 前5天 AND C=L;涨20:=ZF>=20 AND 前5天 AND C=H;跌20:=DF>=20 AND 前5天 AND C=L;涨停板:=IF(INBLOCK('科创板'),涨20,IF(INBLOCK('创业板') AND DATE>1200823,涨20,IF(INBLOCK('ST板块'),涨5,涨10)));跌停板:=IF(INBLOCK('科创板'),跌20,IF(INBLOCK('创业板') AND DATE>1200823,跌20,IF(INBLOCK('ST板块'),跌5,跌10)));STICKLINE(涨停板,O,C,2.8,0),COLORMAGENTA;STICKLINE(跌停板,O,C,2.8,0),COLORBLUE;曾涨5:=ZF>=5 AND 前5天 AND C<H;曾跌5:=DF>=5 AND 前5天 AND C>L;曾涨10:=ZF>=10 AND 前5天 AND C<H;曾跌10:=DF>=10 AND 前5天 AND C>L;曾涨20:=ZF>=20 AND 前5天 AND C<H;曾跌20:=DF>=20 AND 前5天 AND C>L;曾涨停板:=IF(INBLOCK('科创板'),曾涨20,IF(INBLOCK('创业板') AND DATE>1200823,曾涨20,IF(INBLOCK('ST板块'),曾涨5,曾涨10)));曾跌停板:=IF(INBLOCK('科创板'),曾跌20,IF(INBLOCK('创业板') AND DATE>1200823,曾跌20,IF(INBLOCK('ST板块'),曾跌5,曾跌10)));STICKLINE(曾涨停板,O,C,0.1,0),COLORLIMAGENTA;STICKLINE(曾跌停板,O,C,0.1,0),COLORBLUE;{行业 板块 地区 概念}DRAWTEXT_FIX(ISLASTBAR,0.5,0,0,HYBLOCK),COLORRED;{在屏幕左上角显示所属行业板块}DRAWTEXT_FIX(ISLASTBAR,0.55,0,0,DYBLOCK),COLORRED;{在屏幕左上角显示所属地域板块}DRAWTEXT_FIX(ISLASTBAR,0.6,0,0,GNBLOCK),COLORRED;{在屏幕左上角显示所属概念板块}DRAWTEXT_FIX(ISLASTBAR,0.5,0.05,0,FGBLOCK),COLORMAGENTA;{在屏幕左上角显示所属风格};X_1:=CLOSE>=HHV(CLOSE,20);X_2:=CLOSE<MA(CLOSE,20) AND CLOSE<REF(CLOSE,20) AND CLOSE<MA(CLOSE,63);X_3:=BARSLAST(X_1>=1);X_4:=BARSLAST(X_2>=1);X_5:=IF(X_3<X_4,1,(-1));上升:IF(X_5>=1,BOLL,DRAWNULL),COLORFF00FF,LINETHICK3;
下降:IF(X_5<=(-1),BOLL,DRAWNULL),COLOR00FFFF,LINETHICK3;
BOLL:=MA(CLOSE,20);UB:=BOLL+1.2*STD(CLOSE,20);LB:=BOLL-1.2*STD(CLOSE,20);高布林上方草:CLOSE>UB;