波动:=1;
X_1:=(EMA(CLOSE,5)*7+EMA(CLOSE,10)*3)/10;
X_2:=EMA(EMA(LOW,21)+6.8*STD(LOW,2),55);
X_3:=EMA(CLOSE/X_2*(1.88*CLOSE+LOW+OPEN)/2.75,3);
X_4:=(X_3-X_2)/X_2/2;
X_5:=EMA(X_3-X_4*X_3,5);
X_6:=EMA(CLOSE,21)-3*STD(CLOSE,21);
X_7:=IF(X_1>X_5,X_1,X_5);
X_8:=IF(X_7>REF(X_7,1),X_7,X_7);
花开线:IF(CLOSE>X_7,X_7,DRAWNULL),COLORLIMAGENTA,LINETHICK4;
X_9:=IF(X_5<X_1 AND X_5<CLOSE*0.15,EMA(CLOSE,21)-3*STD(CLOSE,21),X_5);
DRAWBAND(X_1,RGB(130,130,0),X_9,0);
DRAWBAND(X_1,RGB(255,150,0),花开线,RGB(255,150,0));
DRAWBAND(花开线,RGB(155,155,0),X_9,RGB(155,155,0));
NOTEXT1:IF(X_7>X_9,X_9,DRAWNULL),COLORGREEN,LINETHICK3;
NOTEXT2:IF(X_7>X_9 AND X_9>=REF(X_9,1),X_9,DRAWNULL),COLORCYAN,LINETHICK3;
NOTEXT3:IF(X_7>X_9 AND X_7<REF(X_7,1),X_7,DRAWNULL),COLORGREEN,LINETHICK2;
NOTEXT介入:IF(X_7>X_9 AND X_9<=REF(X_9,1),X_9,DRAWNULL),COLORRED,LINETHICK3;
X_10:=BARSLASTCOUNT(X_9!=X_8)=1;
DRAWICON(X_10,MIN(X_9,花开线)*1.02,41);
X_11:=MA((CLOSE-MA(CLOSE,13))/MA(CLOSE,13),3)*100;
X_12:=MA((CLOSE-MA(CLOSE,27))/MA(CLOSE,27),3)*100;
X_13:=IF(X_12<0,X_12,0);
X_14:=IF(X_12>0,X_12,0);
X_15:=TROUGHBARS(3,15,1)<10;
X_16:=PEAKBARS(3,15,1)<10;
X_17:=IF(X_15=1,50,0);
X_18:=IF(X_16=1,50,0);
X_19:=X_14<REF(X_14,1) OR X_14-REF(X_14,1)<REF(X_14,1)-REF(X_14,2);
X_20:=X_13>REF(X_13,1);
DRAWICON(X_20 AND X_17=50,LLV(LOW,10)+0.09,38);
DRAWICON(X_19 AND X_18=50,HHV(HIGH,10)+0.01,39);
X_21:=ZIG(3,10);
X_22:=MA(X_21,2);
AKC:DRAWICON(CROSS(X_21,X_22),LOW-0.1,26);
BKC:DRAWICON(CROSS(X_22,X_21),HIGH+0.1,27);
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
STICKLINE(X_21>X_22 AND OPEN>=CLOSE,CLOSE,OPEN,(-1),0),COLORRED;
STICKLINE(X_21>X_22 AND OPEN>=CLOSE,LOW,HIGH,0,0),COLORRED;
STICKLINE(X_21<X_22 AND OPEN<=CLOSE,OPEN,CLOSE,(-1),1),COLORCYAN;
STICKLINE(X_21<X_22 AND OPEN<=CLOSE,OPEN,LOW,0,1),COLORCYAN;
STICKLINE(X_21<X_22 AND OPEN<=CLOSE,CLOSE,HIGH,0,1),COLORCYAN;
X_23:=120;
X_24:=3;
地:REF(LLV(LOW,X_23),X_24),COLORYELLOW;
X_25:=REF(LLV(LOW,X_23),X_24);
X_26:=REFDATE(X_25,DATE);
X_27:=X_26=LOW AND (CLOSE-LOW>0-CLOSE OR OPEN-LOW>CLOSE-OPEN);
STICKLINE(X_27,CLOSE,OPEN,2,0),COLORMAGENTA;
STICKLINE(X_27,LOW,HIGH,0.1,0),COLORMAGENTA;
DRAWICON(X_27,LOW-0.0011,34),COLORYELLOW;
X_28:=REF(HHV(HIGH,150),3);
天:REF(HHV(HIGH,X_23),X_24),COLOREA8800;
X_29:=REFDATE(X_28,DATE);
X_30:=X_29=HIGH AND (CLOSE+LOW<OPEN+CLOSE OR OPEN+LOW<CLOSE+OPEN);
STICKLINE(X_30,CLOSE,OPEN,2,0),COLOREA8800;
STICKLINE(X_30,LOW,HIGH,0.1,0),COLOREA8800;
DRAWICON(X_30,HIGH*1.005,35),COLOREA8800;
STICKLINE(REF(ZIG(3,15),2)<REF(ZIG(3,15),1) AND ZIG(3,15)<REF(ZIG(3,15),1),CLOSE,OPEN,1.2,0),COLOREF6600;
STICKLINE(REF(ZIG(3,15),2)>REF(ZIG(3,15),1) AND ZIG(3,15)>REF(ZIG(3,15),1),CLOSE,OPEN,1.2,0),COLORYELLOW;
X_31:=IF(波动,1,DRAWNULL);
X_32:=10;
X_33:=REF(HIGH,X_32)=HHV(HIGH,2*X_32+1);
X_34:=FILTER(X_33,X_32);
X_35:=BACKSET(X_34,X_32+1);
X_36:=FILTER(X_35,X_32);
阻力:REF(HIGH,BARSLAST(X_36))*X_31,POINTDOT,COLORGREEN;
STICKLINE(CLOSE,阻力,阻力,3,0),COLORGREEN,LINETHICK2;
X_37:=REF(LOW,X_32)=LLV(LOW,2*X_32+1);
X_38:=FILTER(X_37,X_32);
X_39:=BACKSET(X_38,X_32+1);
X_40:=FILTER(X_39,X_32);
托底:REF(LOW,BARSLAST(X_40))*X_31,POINTDOT,COLORRED;
STICKLINE(CLOSE,托底,托底,3,0),COLORRED,LINETHICK2;
X_41:=IF(CURRBARSCOUNT=1,VOL*240/FROMOPEN/REF(VOL,1)-1,VOL/REF(VOL,1)-1);
X_42:=CLOSE;
X_43:=REF(X_42,X_32)=HHV(X_42,2*X_32+1);
X_44:=FILTER(X_43,X_32);
X_45:=BACKSET(X_44,X_32+1);
X_46:=FILTER(X_45,X_32);
X_47:=REF(X_42,X_32)=LLV(X_42,2*X_32+1);
X_48:=FILTER(X_47,X_32);
X_49:=BACKSET(X_48,X_32+1);
X_50:=FILTER(X_49,X_32);
X_51:=REF(CLOSE,BARSLAST(X_46));
X_52:=REF(CLOSE,BARSLAST(X_50));
X_53:=BARSLAST(X_46)<BARSLAST(X_50) AND NOT(X_46);
X_54:=BARSLAST(X_46)>BARSLAST(X_50) AND NOT(X_50);
高峰:IF(X_53,X_51,X_51),POINTDOT,COLORCYAN;
STICKLINE(CLOSE,高峰,高峰,3,0),COLORCYAN,LINETHICK2;
低谷:IF(X_54,X_52,X_52),POINTDOT,COLORMAGENTA;
STICKLINE(CLOSE,低谷,低谷,3,0),COLORMAGENTA,LINETHICK2;