感谢千钧班长发这么好的指标 ,深得同学们喜爱。无以回报,就改成
DZH2和TDX的形式。因函数关系,没有原公式完美。TDX的更不用说了,只有图
形指标 。
C/C++ Code复制内容到剪贴板
- {价量共振 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<QJ,VOL,0);
- 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;
C/C++ Code复制内容到剪贴板
- {价量共振 TDX}
-
- J0:=(HIGH+LOW)/2;
- QJ:=(3*J0+2*REF(J0,1)+REF(J0,2))/6;
- J1:=IF(CLOSE>QJ,VOL,0);
- J2:=IF(CLOSE<QJ,VOL,0);
- 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);
- KD:=IF(CAPITAL<1,CROSS(90,RV),CROSS(99,RV));
- DRAWICON(KZ,差,1);
- DRAWICON(GZ,差,1);
- DRAWICON(KD,趋势,12);
- DRAWICON(GG,趋势,12);
- DRAWICON(GZ AND KZ,差,9);
- DRAWICON(GG AND KD,趋势,14);
- DRAWTEXT(GZ AND KZ,差,' 底共振'),COLORYELLOW;
- DRAWTEXT(GG AND KD,趋势,' 顶共振'),COLOR00FF00;