N1:=100;
N2:=3;
N3:=1;
N4:=1;
N5:=1;
N6:=1;
N7:=1;
N8:=0;
N9:=0;
N10:=0;
N11:=0;
N12:=2;
周期:CURRBARSCOUNT,NODRAW,COLORGREEN;
X_1:=REFX(HHV(MAX(OPEN,CLOSE),N1),周期-1);
X_2:=REFX(LLV(LOW,N1),周期-1);
X_3:=CLOSE/REF(CLOSE,3)<=1-N2/100 AND OPEN>CLOSE;
均五:IF(N9>0,MA(CLOSE,5),DRAWNULL),COLORWHITE;
均十:IF(N10>0,MA(CLOSE,10),DRAWNULL),COLORYELLOW;
均二十:IF(N11>0,MA(CLOSE,20),DRAWNULL),COLORMAGENTA;
X_4:=IF(N12=1,0.5,IF(N12=2,1,IF(N12=3,(-1),IF(N12=4,3,4))));
X_5:=0;
X_6:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1)),周期-1);
X_7:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_6)),周期-1);
X_8:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_7)),周期-1);
X_9:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_8)),周期-1);
X_10:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_9)),周期-1);
X_11:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_10)),周期-1);
X_12:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_11)),周期-1);
X_13:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_12)),周期-1);
X_14:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_13)),周期-1);
X_15:=REFX(BARSLAST(X_3 AND OPEN<X_1),周期-1)+1;
X_16:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_6),周期-1)+1;
X_17:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_7),周期-1)+1;
X_18:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_8),周期-1)+1;
X_19:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_9),周期-1)+1;
X_20:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_10),周期-1)+1;
X_21:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_11),周期-1)+1;
X_22:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_12),周期-1)+1;
X_23:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_13),周期-1)+1;
X_24:=IF(N3=1,1,COUNT(MAX(OPEN,CLOSE)>X_6,X_15-周期)=0);
X_25:=IF(N3=1,1,COUNT(MAX(OPEN,CLOSE)>X_7,X_16-周期)=0);
X_26:=IF(N3=1,1,COUNT(MAX(OPEN,CLOSE)>X_8,X_17-周期)=0);
X_27:=IF(N3=1,1,COUNT(MAX(OPEN,CLOSE)>X_9,X_18-周期)=0);
X_28:=IF(N3=1,1,COUNT(MAX(OPEN,CLOSE)>X_10,X_19-周期)=0);
X_29:=IF(N3=1,1,COUNT(MAX(OPEN,CLOSE)>X_11,X_20-周期)=0);
X_30:=IF(N3=1,1,COUNT(MAX(OPEN,CLOSE)>X_12,X_21-周期)=0);
X_31:=IF(N3=1,1,COUNT(MAX(OPEN,CLOSE)>X_13,X_22-周期)=0);
X_32:=IF(N3=1,1,COUNT(MAX(OPEN,CLOSE)>X_14,X_23-周期)=0);
X_33:=LOW*0.98;
X_34:=CLOSE/REF(CLOSE,1)>=1.099 AND CLOSE=HIGH;
STICKLINE(N7>0 AND X_34,OPEN*1.001,CLOSE,(1),0),COLORYELLOW;
X_35:=CLOSE/REF(CLOSE,1)<=0.9 AND LOW=CLOSE;
STICKLINE(N5>0 AND X_35,OPEN,CLOSE*1.001,(1),0),COLORBLUE;
STICKLINE(周期<X_15 AND X_24,X_6,X_6,X_4,X_5),COLORLIGREEN;
STICKLINE(周期<X_16 AND X_25,X_7,X_7,X_4,X_5),COLORLIBLUE;
STICKLINE(周期<X_17 AND X_26,X_8,X_8,X_4,X_5),COLORLIGREEN;
STICKLINE(周期<X_18 AND X_27,X_9,X_9,X_4,X_5),COLORLIBLUE;
STICKLINE(周期<X_19 AND X_28,X_10,X_10,X_4,X_5),COLORLIGREEN;
STICKLINE(周期<X_20 AND X_29,X_11,X_11,X_4,X_5),COLORLIBLUE;
STICKLINE(周期<X_21 AND X_30,X_12,X_12,X_4,X_5),COLORLIGREEN;
STICKLINE(周期<X_22 AND X_31,X_13,X_13,X_4,X_5),COLORLIBLUE;
STICKLINE(周期<X_23 AND X_32,X_14,X_14,X_4,X_5),COLORLIGREEN;
DRAWTEXT(ISLASTBAR,X_6,VAR2STR(X_6,2)),COLORWHITE;
DRAWTEXT(ISLASTBAR,X_7,VAR2STR(X_7,2)),COLORWHITE;
DRAWTEXT(ISLASTBAR,X_8,VAR2STR(X_8,2)),COLORWHITE;
DRAWTEXT(ISLASTBAR,X_9,VAR2STR(X_9,2)),COLORWHITE;
DRAWTEXT(ISLASTBAR,X_10,VAR2STR(X_10,2)),COLORWHITE;
DRAWTEXT(ISLASTBAR,X_11,VAR2STR(X_11,2)),COLORWHITE;
DRAWTEXT(ISLASTBAR,X_12,VAR2STR(X_12,2)),COLORWHITE;
DRAWTEXT(ISLASTBAR,X_13,VAR2STR(X_13,2)),COLORWHITE;
DRAWTEXT(ISLASTBAR,X_14,VAR2STR(X_14,2)),COLORWHITE;
DRAWTEXT(N8>0 AND X_3 AND OPEN=X_6,HIGH,VAR2STR(周期,0)),COLORGREEN,LINETHICK9;
DRAWTEXT(N8>0 AND X_3 AND OPEN=X_7,HIGH,VAR2STR(周期,0)),COLORCYAN,LINETHICK9;
DRAWTEXT(N8>0 AND X_3 AND OPEN=X_8,HIGH,VAR2STR(周期,0)),COLORGREEN,LINETHICK9;
DRAWTEXT(N8>0 AND X_3 AND OPEN=X_9,HIGH,VAR2STR(周期,0)),COLORCYAN,LINETHICK9;
DRAWTEXT(N8>0 AND X_3 AND OPEN=X_10,HIGH,VAR2STR(周期,0)),COLORGREEN,LINETHICK9;
DRAWTEXT(N8>0 AND X_3 AND OPEN=X_11,HIGH,VAR2STR(周期,0)),COLORCYAN,LINETHICK9;
DRAWTEXT(N8>0 AND X_3 AND OPEN=X_12,HIGH,VAR2STR(周期,0)),COLORGREEN,LINETHICK9;
DRAWTEXT(N8>0 AND X_3 AND OPEN=X_13,HIGH,VAR2STR(周期,0)),COLORCYAN,LINETHICK9;
DRAWTEXT(N8>0 AND X_3 AND OPEN=X_14,HIGH,VAR2STR(周期,0)),COLORGREEN,LINETHICK9;
STICKLINE(周期<X_23,X_2,X_2,X_4,X_5),COLORLIGREEN;
AA:=(C-REF(C,1))/REF(C,1)*100;
ZS:=(NAMELIKE('ST') OR NAMELIKE('*ST') OR NAMELIKE('S')) AND AA>=4.945;
DS:=(NAMELIKE('ST') OR NAMELIKE('*ST') OR NAMELIKE('S')) AND AA<=-4.945;
涨停:IF(ZS,REF(C,1)*1.05,REF(C,1)*1.1),NODRAW,COLORRED;
跌停:IF(DS,REF(C,1)*0.95,REF(C,1)*0.9),NODRAW,COLORGREEN;
A_1:=CLOSE/REF(CLOSE,1)>1.097;
年涨停数:COUNT(A_1,250),NODRAW,COLORLIMAGENTA;
每股收益:FINANCE(38),COLORLIMAGENTA,NODRAW;
利润同比:FINANCE(43),COLORLIBLUE,NODRAW;
收入同比:FINANCE(44),COLORLIBLUE,NODRAW;
STICKLINE(REF(LOW,1)>HIGH,HIGH,REF(LOW,1),5,0),COLORGRAY;
STICKLINE(REF(HIGH,1)<LOW,LOW,REF(HIGH,1),5,0),COLORGRAY;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
A_14:=REF(CLOSE,1);
A_15:=IF(CLOSE>=1,10000,100000);
A_16:=1.1*A_14-49/A_15;
A_17:=1.05*A_14-49/A_15;
A_18:=0.9*A_14+51/A_15;
A_19:=0.95*A_14+51/A_15;
A_20:=NAMELIKE(3) OR NAMELIKE(4);
A_21:=IF(A_20,CLOSE>=A_17,CLOSE>=A_16);
A_22:=IF(A_20,CLOSE<=A_19,CLOSE<=A_18);
A_23:=IF(A_20,HIGH>=A_17,HIGH>=A_16);
A_24:=IF(A_20,LOW<=A_19,LOW<=A_18);
STICKLINE(A_23,HIGH,MAX(CLOSE,OPEN),0,0),COLORMAGENTA;
STICKLINE(A_24,LOW,MIN(CLOSE,OPEN),0,0),COLORLICYAN;
A_25:=CLOSE>OPEN AND (CLOSE>=A_17 OR CLOSE>1.05*OPEN-51/A_15) OR (CLOSE>1000 AND CLOSE>A_14*1.024);
STICKLINE(A_25,OPEN,CLOSE,1,0),COLOR0000BB;
A_26:=CLOSE<OPEN AND (CLOSE<=A_19 OR CLOSE<0.95*OPEN+49/A_15) OR (CLOSE>1000 AND CLOSE<A_14*0.976);
STICKLINE(A_26,OPEN,CLOSE,1,0),COLORLIGREEN;
STICKLINE(A_21,OPEN,CLOSE,1,0),COLORMAGENTA;
STICKLINE(A_22,OPEN,CLOSE,1,0),COLORLICYAN;
M5角度:ATAN((MA(CLOSE,5)/REF(MA(CLOSE,5),1)-1)*100)*180/3.1416,NODRAW,COLORLIGREEN;
上三一:(MAX(OPEN,CLOSE)-MIN(OPEN,CLOSE))*2/3+MIN(OPEN,CLOSE),NODRAW,COLORMAGENTA;
中二一:(OPEN+CLOSE)/2,NODRAW,COLORGREEN;
STICKLINE((O+C)/2,(O+C)/2,(O+C)/2,3,0),COLORGREEN;
下三一:(MAX(OPEN,CLOSE)-MIN(OPEN,CLOSE))/3+MIN(OPEN,CLOSE),NODRAW,COLORYELLOW;
小倍阳:VOL/REF(VOL,1)>=1.9 AND CLOSE>REF(CLOSE,1),NODRAW,COLORYELLOW;
STICKLINE(小倍阳,HIGH,LOW,0,0),COLORYELLOW;
STICKLINE(小倍阳,OPEN,CLOSE,3.1,3),COLORYELLOW;
STICKLINE(C>1.099*REF(C,1),O+(C-O)/2,C,1,0),COLOR00DDFF;
STICKLINE(C<0.901*REF(C,1),C,C+(O-C)/2,1,0),COLOR00DDFF;
A1:=EMA(C,14)COLORWHITE,LINETHICK1;
A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW;
STICKLINE(CROSS(A1X,0),C,O,2,0)COLORYELLOW;
STICKLINE(CROSS(0,A1X),C,O,2,0)COLORGREEN;
BL:=VOL>=REF(V,1)*1.91 AND C>REF(C,1)*1.01;
STICKLINE(FILTER(BL,3),OPEN,CLOSE,1.5,0),COLORLIRED;
XG:=SUMBARS(FILTER(BL,3),1);
STICKLINE(XG,REF(L,XG-1),REF(L,XG-1),10,0),COLORYELLOW;
XX_1:=1.3;
XX_2:=1;
XX_3:=0;
XX_4:=MA(CLOSE,5);
XX_5:=MA(CLOSE,10);
XX_6:=MA(CLOSE,20);
XX_7:=XX_4>REF(XX_4,1) AND XX_5<REF(XX_5,1) AND XX_6<REF(XX_6,1);
XX_8:=REF(VOL,1);
XX_9:=REF(VOL,2);
XX_10:=REF(VOL,3);
XX_11:=REF(CLOSE,1);
XX_12:=REF(CLOSE,2);
XX_13:=REF(CLOSE,3);
XX_14:=REF(CLOSE,4);
XX_15:=REF(OPEN,1);
XX_16:=REF(OPEN,2);
XX_17:=REF(OPEN,3);
XX_18:=REF(OPEN,4);
XX_19:=CLOSE>=XX_13 AND XX_11>=XX_13 AND XX_12>=XX_13;
XX_20:=LOW>XX_17 AND REF(LOW,1)>XX_17 AND REF(LOW,2)>XX_17;
XX_21:=AMOUNT/VOL/100;
XX_22:=REF(XX_21,1);
XX_23:=REF(XX_21,2);
XX_24:=CLOSE>=OPEN OR (CLOSE<OPEN AND XX_21>XX_11);
XX_25:=COUNT(XX_24,3)>=2;
XX_26:=XX_13>XX_17;
XX_27:=XX_21>=XX_22 OR CLOSE>XX_11 AND (XX_22>=XX_23 OR XX_11>=XX_12);
XX_28:=(CLOSE+XX_11+XX_12)/3>XX_13;
XX_29:=VOL>XX_8 AND XX_8>XX_9;
XX_30:=VOL<=XX_8 AND XX_8<=XX_9;
XX_31:=(VOL+XX_8+XX_9)/3<=XX_10 AND NOT(XX_29);
XX_32:=CLOSE/VOL;
XX_33:=XX_32>=REF(XX_32,1) AND REF(XX_32,1)>=REF(XX_32,2);
XX_34:=(CLOSE+XX_11+XX_12)/3/XX_13;
XX_35:=(VOL+XX_8+XX_9)/3/XX_10;
XX_36:=XX_1*XX_34/XX_35>1;
XX_37:=XX_17>XX_14 AND XX_14>XX_18;
XX_38:=XX_26 AND XX_27 AND XX_30 AND XX_19 AND XX_20 AND XX_37;
XX_151:=3;
XX_152:=0;
XX_153:=ABS(LOW-REF(LOW,1))<=XX_152;
XX_154:=ABS(LOW-REF(LOW,2))<=XX_152;
XX_155:=ABS(LOW-REF(LOW,3))<=XX_152;
XX_156:=ABS(LOW-REF(LOW,4))<=XX_152;
XX_157:=ABS(LOW-REF(LOW,5))<=XX_152;
XX_158:=XX_153 OR XX_154 OR XX_155 OR XX_156 OR XX_157;
XX_159:=FILTER(XX_158,XX_151);
XX_160:=BARSLAST(XX_159);
XX_161:=REF(LOW,XX_160);
XX_162:=ABS(LOW-XX_161)<=XX_152;
STICKLINE(XX_159,LOW,LOW,31,(-1)),COLORMAGENTA;
XX_163:=ABS(HIGH-REF(HIGH,1))<=XX_152;
XX_164:=ABS(HIGH-REF(HIGH,2))<=XX_152;
XX_165:=ABS(HIGH-REF(HIGH,3))<=XX_152;
XX_166:=ABS(HIGH-REF(HIGH,4))<=XX_152;
XX_167:=ABS(HIGH-REF(HIGH,5))<=XX_152;
XX_168:=XX_163 OR XX_164 OR XX_165 OR XX_166 OR XX_167;
XX_169:=FILTER(XX_168,XX_151);
XX_170:=BARSLAST(XX_169);
XX_171:=REF(HIGH,XX_170);
XX_172:=ABS(HIGH-XX_171)<=XX_152;
STICKLINE(XX_169,HIGH,HIGH,31,(-1)),COLORGREEN;
XX_173:=CLOSE/REF(CLOSE,1)>=1.095 AND HIGH=LOW;
XX_174:=CLOSE/REF(CLOSE,1)>=1.095 AND HIGH=CLOSE AND OPEN=CLOSE AND HIGH>LOW;
STICKLINE(XX_169,HIGH,HIGH,50,(-1)),COLORGREEN;
STICKLINE(CLOSE/REF(CLOSE,1)>=1.04 OR CLOSE/REF(CLOSE,1)<=0.96 AND NOT(XX_173 OR XX_174),(CLOSE+OPEN)/2,(CLOSE+OPEN)/2,2,1),COLORLIBLUE;
STICKLINE(CLOSE/REF(CLOSE,1)>=1.04 OR CLOSE/REF(CLOSE,1)<=0.96 AND NOT(XX_173 OR XX_174),(MAX(OPEN,CLOSE)-MIN(OPEN,CLOSE))*2/3+MIN(OPEN,CLOSE),(MAX(OPEN,CLOSE)-MIN(OPEN,CLOSE))*2/3+MIN(OPEN,CLOSE),2,1),COLORLIBLUE;
STICKLINE(CLOSE/REF(CLOSE,1)>=1.04 OR CLOSE/REF(CLOSE,1)<=0.96 AND NOT(XX_173 OR XX_174),(MAX(OPEN,CLOSE)-MIN(OPEN,CLOSE))/3+MIN(OPEN,CLOSE),(MAX(OPEN,CLOSE)-MIN(OPEN,CLOSE))/3+MIN(OPEN,CLOSE),2,1),COLORLIBLUE;
所属板块:=STRCAT('【所属板块】',STRCAT(STRCAT(STRCAT(' [行业]—',HYBLOCK),STRCAT(' [地域]—',DYBLOCK)),STRCAT(' [概念]—',GNBLOCK)));
DRAWTEXT_FIX(ISLASTBAR,0.005,0.02,0,所属板块),COLORYELLOW;
NN8:=STRCAT(CON2STR(YEAR,0),' 年 ');
Y8:=STRCAT(CON2STR(MONTH,0),' 月 ');
R8:=STRCAT(CON2STR(DAY,0),' 日 ');
SJ8:=STRCAT(STRCAT(N8,Y8), R8);
DRAWTEXT_FIX(C>0,0.88,2,0,SJ8),COLOR00FFFF;
DRAWTEXT_FIX(ISLASTBAR,0.81,2,2,CODE),COLORMAGENTA;
DRAWTEXT_FIX(ISLASTBAR,0.86,2,2,STKNAME),COLORMAGENTA;