VC:=(REF(C,4)*REF(V,4)+REF(C,3)*REF(V,3)+REF(C,2)*REF(V,2)+REF(C,1)*REF(V,1)+C*V)/(V+REF(V,1)+REF(V,2)+REF(V,3)+REF(V,4));
SQX:=(VC-MA(VC,14))*100;
DIF:MA(SQX,4),COLORWHITE;
DEA:EMA(DIF,5),COLORYELLOW;
MACD:(DIF-DEA)*2,linethick0;
STICKLINE(MACD>0 and macd>ref(macd,1),0,macd,2,0),COLORred;
STICKLINE(macd>0 and macd<ref(macd,1),0,macd,2,1),COLORred;
STICKLINE(macd<0 and macd<ref(macd,1),0,macd,2,0),COLORgreen;
STICKLINE(macd<0 and macd>ref(macd,1),0,macd,2,1),COLORgreen;
MACDIA:=IF(MACD=REF(MACD,1),0,
IF(MACD>REF(MACD,1),IF(MACD<0,ABS(MACD/REF(MACD,1)-1)*100,
IF(REF(MACD,1)<0,100,
IF((MACD/REF(MACD,1)-1)*100>100,MOD((MACD/REF(MACD,1)-1)*100,100)+100,(MACD/REF(MACD,1)-1)*100))),
IF(MACD<REF(MACD,1),
IF(MACD>0,(MACD/REF(MACD,1)-1)*100,IF(REF(MACD,1)>0,-100,
IF(REVERSE(MACD/REF(MACD,1)-1)*100<-100,MOD(REVERSE(MACD/REF(MACD,1)-1)*100,100)-100,
REVERSE(MACD/REF(MACD,1)-1)*100))),100)));
MACDIiA:=IF(MACDia=REF(MACDia,1),0,IF(MACDia>REF(MACDia,1),IF(MACDia<0,
ABS(MACDia/REF(MACDia,1)-1)*100,IF(REF(MACDia,1)<0,100,IF((MACDia/REF(MACDia,1)-1)*100>100,
MOD((MACDia/REF(MACDia,1)-1)*100,100)+100,(MACDia/REF(MACDia,1)-1)*100))),
IF(MACDia<REF(MACDia,1),IF(MACDia>0,(MACDia/REF(MACDia,1)-1)*100,IF(REF(MACDia,1)>0,-100,
IF(REVERSE(MACDia/REF(MACDia,1)-1)*100<-100,MOD(REVERSE(MACDia/REF(MACDia,1)-1)*100,100)-100,
REVERSE(MACDia/REF(MACDia,1)-1)*100))),100)));
MACDIiiA:=IF(MACDiia=REF(MACDiia,1),0,IF(MACDiia>REF(MACDiia,1),IF(MACDiia<0,
ABS(MACDiia/REF(MACDiia,1)-1)*100,IF(REF(MACDiia,1)<0,100,IF((MACDiia/REF(MACDiia,1)-1)*100>100,
MOD((MACDiia/REF(MACDiia,1)-1)*100,100)+100,(MACDiia/REF(MACDiia,1)-1)*100))),
IF(MACDiia<REF(MACDiia,1),IF(MACDiia>0,(MACDiia/REF(MACDiia,1)-1)*100,IF(REF(MACDiia,1)>0,-100,
IF(REVERSE(MACDiia/REF(MACDiia,1)-1)*100<-100,MOD(REVERSE(MACDiia/REF(MACDiia,1)-1)*100,100)-100,
REVERSE(MACDiia/REF(MACDiia,1)-1)*100))),100)));
穿0线:MACDIA*0.1,linethick2;