HJ_1:=MA(CLOSE,240);
HJ_2:=IF(COUNT(HJ_1<=REF(HJ_1,1),50)=50,1,0);
HJ_3:=IF(REF(HJ_2,1)=1 AND HJ_1>=REF(HJ_1,1),1,0);
HJ_4:=BARSLAST(HJ_3);
HJ_5:=ISLASTBAR;
HJ_6:=BACKSET(HJ_5=1,HJ_4);
HJ_7:=IF(HJ_6>REF(HJ_6,1),1,0);
HJ_8:=BARSLAST(HJ_7=1);
HJ_9:=IF(HJ_8=0,LLV(LOW,240),0);
HJ_10:=BARSLAST(HJ_9>0);
HJ_11:=CONST(REF(HJ_9,HJ_10));
箱底:DRAWLINE(LOW=HJ_11,HJ_11,HJ_8=0,HJ_11,1),COLOR00D9D9;
HJ_12:=IF(HJ_8=0,HHV(HIGH,240),0);
HJ_13:=CONST(REF(HJ_12,HJ_10));
箱顶:DRAWLINE(LOW=HJ_11,HJ_13,HJ_8=0,HJ_13,1),COLOR00D9D9;
HJ_14:=BARSSINCEN(CROSS(CLOSE,箱顶),HJ_8);
HJ_15:=HHV(CLOSE,HJ_14);
DRAWLINE(HJ_14=0,HJ_11,CLOSE,HJ_11,0),COLORRED;
DRAWLINE(HJ_14=0,HJ_13,CLOSE,HJ_13,0),COLORRED;
HJ_16:=CONST(HJ_11+(HJ_13-HJ_11)/2);
DRAWLINE(HJ_8=0,HJ_16,CLOSE,HJ_16,0),COLORCYAN;
STICKLINE(HJ_14=0,箱顶,箱底,0,0),COLORMAGENTA;
MA5:MA(CLOSE,5),COLORWHITE;
MA10:MA(CLOSE,10),COLORYELLOW;
MA30:MA(CLOSE,30),COLORRED;
MA60:MA(CLOSE,60),COLORGREEN;