机构持仓占比:=(2*C+H+L)/4;
机构买卖:=MA(机构持仓占比,3)>REF(MA(机构持仓占比,3),1);
指标公式源码:=(CLOSE-LLV(LOW,7))/(HHV(HIGH,7)-LLV(LOW,7))*100;
dddss1:=EMA(WINNER(C)*100,5);{通达信公式-通达信指标www.gs6699.com}
dddss2:=MA(SMA(C-REF(C,1),3,1)/SMA(H-REF(C,1),3,1),3)*100;
K:MA(3*SMA(指标公式源码,6,1)-2*SMA(SMA(指标公式源码,5,1),5,1),3),LINETHICK1,COLORWHITE;
D:MA(K,3),COLORYELLOW,LINETHICK1;
J:3*K-2*D,COLORYELLOW,LINETHICK1;
dddss3:=SMA(MAX(C-REF(C,2),0),6,1)/SMA(ABS(C-REF(C,2)),6,1)*100;
dddss4:=MA(3*SMA((C-LLV(L,21))/(HHV(H,21)-LLV(L,21))*100,5,1)-2*SMA(SMA((C-LLV(L,21))/(HHV(H,21)-LLV(L,21))*100,5,1),3,1),3);
dddss5:IF(CROSS(dddss3,14) OR dddss4>REF(dddss4,1) AND CROSS(K,dddss1)AND K<40,10,0),COLORYELLOW;
IF(dddss1>80 AND CROSS(95,K),85,100);
dddss6:K<5 AND LLV(C,3)/HHV(C,20)<0.8,COLORYELLOW;
STICKLINE(dddss6,0,30,3,0),COLORYELLOW;
dddss7:=COUNT(CROSS(K,dddss1),2)=1 AND CROSS(K,dddss4)AND dddss4/REF(dddss4,1)>0.9 AND K<50;
dddss8:=CROSS(K,D)AND D<10 OR CROSS(K,D)AND CROSS(K,dddss4)AND D<18;
DRAWTEXT(FILTER((dddss7 OR dddss8)AND K>REF(K,1),5)AND 机构买卖 ,D,'');
DRAWTEXT(CROSS(D,K)AND CROSS(dddss4,K)AND D>85,D,'');
DRAWTEXT(FILTER(K>REF(K,1)AND (CROSS(K,10)OR CROSS(K,dddss1))AND COUNT(dddss3<14,3)>=1,3),15,'');
dddss9:dddss1>85 AND K>85 OR dddss1>90 OR K>90,LINETHICK0,COLORLIGRAY;
STICKLINE(dddss9,MAX(dddss1,K),100,5,1),COLORLIGRAY;
DRAWICON(CROSS(dddss2,-300)AND K<10,5,1);
A8:=BARSLAST(REF(CROSS(K,D),1));
ffdfd1:=(A8<15 AND D<50 AND K>REF(K,A8+1) AND CROSS(K,D)AND dddss4<60);
DRAWTEXT(ffdfd1 AND 机构买卖,K,''),COLORYELLOW;
ffdfd2:=LLV(C,2)<REF(LLV(C,15),2);
DRAWTEXT(ffdfd1 AND ffdfd2,K,''),COLORRED;
DRAWTEXT(LONGCROSS(J,K,7)AND CROSS(J,dddss1)AND dddss1<30 AND dddss1>REF(dddss1,1),K,'穿三线'),COLORMAGENTA;
DRAWTEXT(CROSS(84,dddss3)AND CROSS(K,dddss3),90,'虎口'),COLOR00FF00;
ffdfd5:=MA((机构持仓占比-MA(机构持仓占比,13))/(0.15*AVEDEV(机构持仓占比,13)),3);
DRAWICON(CROSS(ffdfd5,-15)AND J>REF(J,1),5,1);
DRAWICON(CROSS(20,ffdfd5),100,2);
IF(K<REF(K,1),K,DRAWNULL),COLORGREEN,LINETHICK1;
IF(D<REF(D,1),D,DRAWNULL),COLORGREEN,LINETHICK1;
IF(J<REF(J,1),J,DRAWNULL),COLORFFFF00,LINETHICK1;
IF(K>REF(K,1),K,DRAWNULL),COLORRED,LINETHICK1;
IF(D>REF(D,1),D,DRAWNULL),COLORRED,LINETHICK1;
IF(J>REF(J,1),J,DRAWNULL),COLORFF00FF,LINETHICK1;