P0:=MA(INDEXC,34);
P1:=(55P0+34REF(P0,1)+21REF(P0,2)+13REF(P0,3)+8REF(P0,4)+5REF(P0,5)
+3REF(P0,6)+2REF(P0,7)+REF(P0,8)+REF(P0,9))/143;
P2:=REF(P1,1);
大盘长牛熊:=0.5*(P1+P2);
H0:=MA(C,8);
H1:=(55H0+34REF(H0,1)+21REF(H0,2)+13REF(H0,3)+8REF(H0,4)+5REF(H0,5)
+3REF(H0,6)+2REF(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:=(55I0+34REF(I0,1)+21REF(I0,2)+13REF(I0,3)+8REF(I0,4)+5REF(I0,5)
+3REF(I0,6)+2REF(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;