W3:=IF(C>36.52,36.52,3.652),NODRAW;
W4:=IF(W3=36.52,9.13,0.913),NODRAW;
个股:=IF(C=INDEXC,0,1);
下限:IF(个股=1,INTPART(C/W4)*W4,0),COLORGREEN;
上限:IF(个股=1,下限+(W4),0),COLORYELLOW;
IF(BArslAST(下限>REF(下限,1) OR 下限<REF(下限,1)),REF(下限,BARSLAST(下限>REF(下限,1) OR 下限<REF(下限,1))),DRAWNULL),COLORRED;
IF(BARSLAST(上限>REF(上限,1) OR 上限<REF(上限,1)),REF(上限,BARSLAST(上限>REF(上限,1) OR 上限<REF(上限,1))),DRAWNULL),COLORYELLOW;
中线下限:=IF(个股=1,INTPART(C/W3 )*W3,0);
中线上限:=IF(个股=1,中线下限+(W3),0);
中线半分位:=(中线上限+中线下限)/2;
MC:=中线上限,COLORWHITE;
IF(BARSLAST(MC>REF(MC,1) OR MC<REF(MC,1)),REF(MC,BARSLAST(MC>REF(MC,1) OR MC<REF(MC,1))),DRAWNULL),COLORWHITE,LINETHICK2;
MR:=中线下限,COLORRED;
IF(BARSLAST(MR>REF(MR,1) OR MR<REF(MR,1)),REF(MR,BARSLAST(MR>REF(MR,1)
OR MR<REF(MR,1))),DRAWNULL),COLORYELLOW,LINETHICK2;
ZX:=中线半分位;
IF(BARSLAST(ZX>REF(ZX,1) OR ZX<REF(ZX,1)),REF(ZX,BARSLAST(ZX>REF(ZX,1) OR ZX<REF(ZX,1))),DRAWNULL),COLORMAGENTA,LINETHICK2;
DRAWNUMBER(ISLASTBAR,下限,下限),COLORRED;
DRAWNUMBER(ISLASTBAR,上限,上限),COLORYELLOW;
买入价11:=IF(BARSLAST(下限),REF(下限,BARSLAST(下限)),REF(下限,BARSLAST(下限))),COLORRED;
卖出价11:=IF(BARSLAST(上限),REF(上限,BARSLAST(上限)),REF(上限,BARSLAST(上限))),COLORRED;
半分位:(买入价11+卖出价11)/2,LINETHICK1,POINTDOT,COLORMAGENTA;
IF(BARSLAST(半分位>REF(半分位,1) OR 半分位<REF(半分位,1)),REF(半分位,BARSLAST(半分位>REF(半分位,1) OR 半分位<REF(半分位,1))),DRAWNULL),COLORCYAN,LINETHICK1;
DRAWNUMBER(ISLASTBAR,半分位,半分位),COLORYELLOW;