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);
DEM3:EMA(Dma(bc,(VOL/(SUM(AMOUNT,3)/(市价*100)))),1),COLORWHITE;
DEM7:EMA(Dma(bc,(VOL/(SUM(AMOUNT,7)/(市价*100)))),1),COLORYELLOW;
DEM13:EMA(Dma(bc,(VOL/(SUM(AMOUNT,13)/(市价*100)))),1),COLOR6600FF;
CB:EMA(Dma(bc,(VOL/(SUM(AMOUNT,38)/(市价*100)))),1),COLOR00bb00,LINETHICK2;
转弱:CB*(1-997/10000),DOTLINE,COLORCYAN;
反弹:CB*0.809,COLOR0077FF,DOTLINE;
转强:CB*(1+997/10000),DOTLINE,COLORMAGENTA;
警示:CB*1.191,COLOR0077FF,DOTLINE;
glC:=((BC/DEM3-1)*100+(BC/DEM7-1)*100+(BC/DEM13-1)*100+(BC/CB-1)*100)/4,COLORRED;
gl3:=((DEM3/DEM7-1)*100+(DEM3/DEM13-1)*100+(DEM3/ref(DEM3,1)-1)*100)/3;
gl7:=((DEM7/DEM13-1)*100+(DEM7/REF(DEM7,1)-1)*100)/2;
gl13:=(DEM13/REF(DEM13,1)-1)*100;
gL21:=((DEM3/CB-1)*100+(DEM7/CB-1)*100+(DEM13/CB-1)*100+(CB/REF(CB,1)-1)*100)/4;
乖:=(gl3+gl7+gl13);
合:=(glC+gl3+gl7+gl13+gl21)/5;
离:=((ema(合,12)+ema(合,14))/2+ema(合,13))/2,COLORGREEN;
DRAWTEXT(crOSS(乖,0)and (离>REF(离,1)),L*0.96,'★'),COLORYELLOW;
DRAWTEXT(CROSS(乖,离)AND 离>0,L*0.96,'★'),COLORRED;