DRAWGBK(OPEN>0,RGB(10,10,10),RGB(0,0,0),0,1,0);
X_1:=MA(CLOSE,13);
X_2:=REF(X_1,13/2+1);
X_3:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;
X_4:=BARSLAST(X_3>3);
X_5:=IF(X_4>0,1,0);
STICKLINE(CLOSE>=X_2 AND X_5=0,HIGH,LOW,0,1),COLOR2CB3E3;
STICKLINE(CLOSE>=X_2 AND X_5=0,OPEN,CLOSE,8,1),COLOR2CB3E3;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
X_6:=HHV(CLOSE,2);
X_7:=LLV(CLOSE,2);
X_8:=REF(CLOSE,1);
X_9:=SMA(MAX(CLOSE-X_8,0),6,1)/SMA(ABS(CLOSE-X_8),6,1)*100;
X_10:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
X_11:=REF(X_10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
X_12:=REF(X_11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
X_13:=REF(X_12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
X_14:=REF(X_13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
X_15:=REF(X_14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
X_16:=REF(X_15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
X_17:=REF(X_16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
X_18:=REF(X_17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
X_19:=REF(X_18,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
X_20:=REF(X_19,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
X_21:=REF(X_20,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
X_22:=HHV(FORCAST(X_9,7),14);
X_23:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
X_24:=REF(X_23,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
X_25:=REF(X_24,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
X_26:=REF(X_25,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
X_27:=REF(X_26,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
X_28:=REF(X_27,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
X_29:=REF(X_28,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
X_30:=REF(X_29,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
X_31:=REF(X_30,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
X_32:=REF(X_31,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
X_33:=REF(X_32,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
X_34:=REF(X_33,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
X_35:=SMA(X_22,3,1);
X_36:=SMA(X_35,3,1);
X_37:=3*X_35-2*X_36;
X_38:=REF(X_23 OR X_24 OR X_25 OR X_26 OR X_27 OR X_28 OR X_29 OR X_30 OR X_31 OR X_32 OR X_33 OR X_34,1) AND X_10;
X_39:=REF(X_10 OR X_11 OR X_12 OR X_13 OR X_14 OR X_15 OR X_16 OR X_17 OR X_18 OR X_19 OR X_20 OR X_21,1) AND X_23;
红色持股:X_10 OR X_11 OR X_12 OR X_13 OR X_14 OR X_15 OR X_16 OR X_17 OR X_18 OR X_19 OR X_20 OR X_21,NODRAW,COLORRED;
X_40:=IF(红色持股,X_7,DRAWNULL);
X_41:=X_40;
X_42:=REF(X_40,1);
X_43:=X_23 OR X_24 OR X_25 OR X_26 OR X_27 OR X_28 OR X_29 OR X_30 OR X_31 OR X_32 OR X_33 OR X_34;
X_44:=IF(X_43,X_6,DRAWNULL);
X_45:=X_44;
X_46:=REF(X_45,1);
X_47:=X_38;
X_48:=X_39;
X_49:=SMA(X_9,3,1);
X_50:=SMA(X_49,3,1);
X_51:=3*X_49-2*X_50;
STICKLINE(ISLASTBAR AND (红色持股 OR REF(红色持股,1)=1),X_42,X_42,30,1),COLORRED;
STICKLINE(ISLASTBAR AND (X_43 OR REF(X_43,1)=1),X_46,X_46,30,1),COLORGREEN;
STICKLINE(CLOSE>=OPEN,LOW,HIGH,0,0),COLOR0000CC;
STICKLINE(CLOSE<OPEN,LOW,HIGH,0,0),COLOR999900;
STICKLINE(1,CLOSE,OPEN,3.5,0),COLOR858500;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,3.5,0),COLOR0000E5;
X_52:=IF(CLOSE>=MA(CLOSE,20),80,50);
X_53:=IF(CLOSE>=MA(CLOSE,20),50,20);
STICKLINE(红色持股,CLOSE,OPEN,2.8,0),COLOR000055;
STICKLINE(红色持股,CLOSE,OPEN,2,0),COLOR000088;
STICKLINE(红色持股,CLOSE,OPEN,1.5,0),COLOR0000AA;
STICKLINE(红色持股,CLOSE,OPEN,1,0),COLOR0000CC;
STICKLINE(红色持股,CLOSE,OPEN,0.5,0),COLOR0000EE;
STICKLINE(X_43,CLOSE,OPEN,2.8,0),COLOR555500;
STICKLINE(X_43,CLOSE,OPEN,2,0),COLOR888800;
STICKLINE(X_43,CLOSE,OPEN,1.5,0),COLORAAAA00;
STICKLINE(X_43,CLOSE,OPEN,1,0),COLORCCCC00;
STICKLINE(X_43,CLOSE,OPEN,0.5,0),COLOREEEE00;
YL:IF(CROSS(X_37,X_51),HIGH,REF(HIGH,BARSLAST(CROSS(X_37,X_51)))),DOTLINE,COLORWHITE;
X_54:=IF(X_51<X_52 AND REF(X_51,1)>=X_52,HHV(REF(HIGH,1),BARSLAST(X_51>=X_52 AND REF(X_51,1)<X_52)-1),REF(HHV(REF(HIGH,1),BARSLAST(X_51>=X_52 AND REF(X_51,1)<X_52)-1),BARSLAST(X_51<X_52 AND REF(X_51,1))));
X_55:=IF(HIGH>X_54,LOW,REF(LOW,BARSLAST(HIGH>X_54)));
X_56:=BARSLAST(CLOSE>=X_2 AND X_5=0);
X_57:=IF(HIGH>X_54,X_51,REF(X_51,BARSLAST(HIGH>X_54)));
DRAWICON(X_9>X_22,LOW*0.99,41);
LZ:IF(HIGH>X_55 AND X_51<X_57 AND X_51<X_37,HIGH,REF(HIGH,BARSLAST(HIGH>X_55 AND X_51<X_57 AND X_51<X_37))),DOTLINE,COLORGREEN;
X_58:=IF(X_51>X_53 AND REF(X_51,1)<=X_53,LLV(REF(LOW,1),BARSLAST(X_51<=X_53 AND REF(X_51,1)>X_53)-1),REF(LLV(REF(LOW,1),BARSLAST(X_51<=X_53 AND REF(X_51,1)>X_53)-1),BARSLAST(X_51>X_53 AND REF(X_51,1))));
X_59:=IF(LOW<X_58,HIGH,REF(HIGH,BARSLAST(LOW<X_58)));
X_60:=IF(LOW<X_58,X_51,REF(X_51,BARSLAST(LOW<X_58)));
X_61:=REF(HIGH,X_56);
ZC:IF(CROSS(X_51,X_37),LOW,REF(LOW,BARSLAST(CROSS(X_51,X_37)))),DOTLINE,COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.35,0.15,0,CODE),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.42,0.15,0,STKNAME),COLORRED;
DRAWTEXT_FIX(ISLASTBAR,0.53,0.15,0,HYBLOCK),COLORCYAN;
DRAWTEXT_FIX(ISLASTBAR,0.62,0.15,0,DYBLOCK),COLORB4EEB4;
DRAWTEXT_FIX(ISLASTBAR,0.35,0.25,0,GNBLOCK),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0.56,0.25,0,FGBLOCK),COLORMAGENTA;
DRAWTEXT_FIX(ISLASTBAR,0.35,0.35,0,ZSBLOCK);
YJ:IF(LOW<X_59 AND X_51>X_60 AND X_51>X_37,LOW,REF(LOW,BARSLAST(LOW<X_59 AND X_51>X_60 AND X_51>X_37))),DOTLINE,COLORMAGENTA;
DRAWTEXT(FILTER(ABS(ZC-YL)>0.045 OR ABS(ZC-YL)=0 AND CLOSE>ZC AND CLOSE>OPEN AND (ABS(REF(ZC,2)-REF(ZC,2))>0.05 OR ABS(REF(ZC,1)-REF(ZC,1)=0)),30),LOW,2),COLORYELLOW;
DRAWTEXT(FILTER(ABS(YL-ZC)>0.045 OR ABS(YL-ZC)=0 AND CLOSE>YL AND CLOSE>OPEN AND (ABS(REF(YL,2)-REF(YL,2))>0.05 OR ABS(REF(YL,1)-REF(YL,1)=0)),30),LOW,3),COLORCYAN;
X_62:=MA(CLOSE,10);
X_63:=50*(CLOSE-X_62)/STD(CLOSE,10);
X_64:=MA(CLOSE,20);
X_65:=50*(CLOSE-X_64)/STD(CLOSE,20);
X_66:=MA(CLOSE,60);
X_67:=60*(CLOSE-X_66)/STD(CLOSE,60);
X_68:=MA(CLOSE,120);
X_69:=50*(CLOSE-X_68)/STD(CLOSE,120);
X_70:=(X_63+X_65+X_67+X_69)/4;
X_71:=EMA(X_70,5);
IF(X_71>REF(X_71,1),YL,DRAWNULL),COLORRED;
IF(X_71<REF(X_71,1),YL,DRAWNULL),COLORBLUE;
IF(X_71>REF(X_71,1),ZC,DRAWNULL),COLORRED;
IF(X_71<REF(X_71,1),ZC,DRAWNULL),COLORBLUE;
IF(X_71>REF(X_71,1),LZ,DRAWNULL),COLORRED;
IF(X_71<REF(X_71,1),LZ,DRAWNULL),COLORBLUE;
IF(X_71>REF(X_71,1),YJ,DRAWNULL),COLORRED;
IF(X_71<REF(X_71,1),YJ,DRAWNULL),COLORBLUE;
X_72:=KDJ.J;
X_73:=BARSLAST(X_72<REF(X_72,1));
X_74:=SUMBARS(X_73=1,2);
X_75:=SUMBARS(X_73=1,3);
X_76:=REF(X_72,X_73);
X_77:=REF(X_72,X_74);
X_78:=REF(X_72,X_75);
X_79:=X_76>X_77 AND X_77>X_78 AND X_72>REF(X_72,1);
X_80:=(CLOSE/OPEN-1)*100;
X_81:=(CLOSE/REF(CLOSE,1)-1)*100;
X_82:=X_80>3 AND X_80=HHV(X_80,6);
X_83:=X_81>3 AND X_81=HHV(X_81,6);
X_84:=X_81>=9 AND CLOSE=HIGH;
X_85:=X_79;
X_86:=BARSLAST(X_85);
X_87:=IF(X_86<=13 AND COUNT(CLOSE>REF(LOW,X_86),X_86)>=X_86-1,X_86,0);
X_88:=IF(X_86>=4 AND COUNT(CLOSE>REF(CLOSE,X_86),3)>=3,REF(CLOSE,X_86),REF(LOW,X_86));
X_89:=LOW<X_88*1.01 AND COUNT(LOW<X_88*1.01,X_87)=1;
X_90:=LOW<X_88 AND COUNT(LOW<X_88,X_87)=1;
X_91:=IF(X_89 OR X_90,1,0);
DRAWICON(X_85,LOW*0.97,23);
DRAWTEXT(X_85,LOW*0.96,4),COLORYELLOW;
DRAWTEXT(X_91,LOW*0.985,5),COLORGREEN;
X_92:=LLV(LOW,4);
X_93:=LLV(LOW,19);
X_94:=HHV(HIGH,4);
X_95:=HHV(HIGH,19);
DRAWTEXT(X_92-X_93>X_95-X_94 AND X_49=1 AND BARSTATUS=2,X_92,6),COLORMAGENTA;
DRAWTEXT(X_92-X_93<X_95-X_94 AND X_49=1 AND BARSTATUS=2,X_94,7),COLORCYAN;
X_96:=8;
X_97:=BARSLAST(VOL=HHV(VOL,20));
DRAWTEXT(X_97,CLOSE,X_96),COLORFCFCFC;
DRAWNUMBER(X_56,X_61,HIGH),COLORWHITE;