{价量共振 DZH2}
上除权:=SPLITBARS(1);
本除权:=BARSLAST(IF(SPLITBARS(0)=1,SPLITBARS(0)+1,0))+1;
比例:SPLIT(1),LINETHICK0;
J0:=(HIGH+LOW)/2;
QJ:=WMA(J0,3);
J1:=IF(CLOSE>QJ,VOL,0);
J2:=IF(CLOSE
RV:=(qj-LLV(qj,144))/(HHV(qj,144)-LLV(qj,144))*100;
统计:=SUM(J1-J2,5);
差:EMA(统计,10)-EMA(统计,34),COLORFFFFFF;
趋势:EMA(差,5),COLOR00FFFF;
结:2*(差-趋势),COLORSTICK;
GZ:=cross(差,趋势);
GG:=cross(趋势,差);
KZ:=cross(RV,5);
复权价:=C*(1+比例);
KD:=if(CAPITAL<1,cross(90,RV),cross(99,RV));
DRAWICON(KZ,差,10),ALIGN1,VALIGN0;
DRAWICON(GZ,差,12),ALIGN1,VALIGN1;
DRAWICON(KD,趋势,8),ALIGN1,VALIGN1;
DRAWICON(GG,趋势,13),ALIGN1,VALIGN1;
DRAWTEXT(GZ and KZ,差,'底共振'),COLORYELLOW;
DRAWTEXT(GG and KD,趋势,'顶共振'),COLOR00FF00;
VERTLINE(GZ and KZ,1),COLORYELLOW;
VERTLINE(GG and KD,1),COLOR00FF00;
DRAWTEXTREL(10,0,'上次除权距今:'+NUMTOSTRN(上除权,0)+' 天'),COLOREE8899;
DRAWTEXTREL(10,150,'本次除权距今:'+NUMTOSTRN(本除权,0)+' 天'),COLOREE8899;
DRAWTEXTREL(710,0,'当前复权价格:'+NUMTOSTRN(复权价,2)+' 元'),COLOREE8899;