M1:=5;
M2:=10;
M3:=20;
M4:=60;
M5:=120;
M6:=144;
M7:=189;
M8:=250;
X_1:=(COst(90+(100-90)/2)-COST((100-90)/2))/(COST(90+(100-90)/2)+COST((100-90)/2))+CLOSE;
X_2:=REF(HHV(X_1,20),0);
STICKLINE(X_1>CLOSE,X_2,X_1,2,0),COLORGRAY;
STICKLINE(X_1>CLOSE,X_2,X_1,1,0),COLORBLacK;
STICKLINE(X_1>CLOSE,X_2,X_1,0.5,0),COLORGRAY;
STICKLINE(X_1>REF(X_1,1),X_1,X_2,2,0),COLOR1388A3;
STICKLINE(X_1>REF(X_1,1),X_1,X_2,1,0),COLORBLACK;
STICKLINE(X_1>REF(X_1,1),X_1,X_2,0.5,0),COLOR1388A3;
STICKLINE(X_1=X_2,X_2,LOW,2,0),COLORYELLOW;
MA1:MA(CLOSE,M1);
MA2:MA(CLOSE,M2);
MA3:MA(CLOSE,M3);
MA4:MA(CLOSE,M4);
MA5:MA(CLOSE,M5);
MA6:MA(CLOSE,M6);
MA7:MA(CLOSE,M7);
MA8:MA(CLOSE,M8);
X_3:=EMA(((2*CLOSE+HIGH+LOW)/4-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,8);
X_4:=EMA(X_3,5);
X_5:=REFDATE(REF(HHV(MAX(CLOSE,OPEN),96),5),DATE);
X_6:=REFDATE(REF(LLV(MIN(CLOSE,OPEN),96),5),DATE);
X_7:=(X_5+X_6)/2;
箱顶:IF(X_3>0 AND X_3-X_4<=0,X_5,X_5),DOTLINE,COLORRED;
箱腰:IF(X_3>0 AND X_3-X_4<=0,X_7,X_7),DOTLINE,COLORYELLOW;
箱低:IF(X_3>0 AND X_3-X_4<=0,X_6,X_6),DOTLINE,COLORLIGRAY;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);