以下是通达信牛熊趋势指标,牛市熊市一目了然

P0:=MA(INDEXC,34);
P1:=(55*P0+34*REF(P0,1)+21*REF(P0,2)+13*REF(P0,3)+8*REF(P0,4)+5*REF(P0,5)
+3*REF(P0,6)+2*REF(P0,7)+REF(P0,8)+REF(P0,9))/143;
P2:=REF(P1,1);
大盘长牛熊:=0.5*(P1+P2);

 

H0:=MA(C,8);
H1:=(55*H0+34*REF(H0,1)+21*REF(H0,2)+13*REF(H0,3)+8*REF(H0,4)+5*REF(H0,5)
+3*REF(H0,6)+2*REF(H0,7)+REF(H0,8)+REF(H0,9))/143;
H2:=REF(H1,1);
短期牛熊:0.5*(H1+H2),NODRAW,COLORYELLOW;
DRAWBAND(H1,RGB(255,255,0),H2,RGB(0,0,255));
STICKLINE(H1>H2,H1,H2,10,0),COLORYELLOW;

I0:=MA(C,34);
I1:=(55*I0+34*REF(I0,1)+21*REF(I0,2)+13*REF(I0,3)+8*REF(I0,4)+5*REF(I0,5)
+3*REF(I0,6)+2*REF(I0,7)+REF(I0,8)+REF(I0,9))/143;
I2:=REF(I1,1);
长期牛熊:0.5*(I1+I2),NODRAW,COLORRED;
DRAWBAND(I1,RGB(255,0,0),I2,RGB(0,255,0));
STICKLINE(I1>I2,I1,I2,10,0),COLORRED;
差:100*(短期牛熊-长期牛熊)/长期牛熊,COLORMAGENTA,NODRAW;

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。