N:=60;m:=5;
bc:=(IF(C (H+L+C)/3,(H*0.618+L*0.382)*0.382,(H*0.382+L*0.618)*0.382)+(O*0.382+C*0.618)*0.618);
市价:=AMOUNT/(VOL*100);
MX:=if(INDEXC=C,BC,市价);
EM6:EMA(BC,M),COLORWHITE;
EMN:EMA((MA(MX,N)+SMA(MX,N,N/3))/2,N),COLOR6600FF,LINETHICK2;
悲:EMN-STD(MX,N),COLORAAAA00,DOTLINE;
欢:EMN+STD(MX,N),COLOR0077FF,DOTLINE;
gL:=(c-EMN)*c;
离合:EMN-(Ema(gL,1)-EMN)/EMN,COLOR00bb00;
箱顶:ref(HHV(EMA(BC,M),(N-(N/10+3))),1),LINETHICK1,COLORFF0080;
箱底:ref(llV(EMA(BC,M),(N-(N/10+3))),1),LINETHICK1,COLORCYAN;