金股分时副图-精品通达信指标公式源码分享
JINGU1:=SUM(IF(CLOSE>REF(CLOSE,1),VOL/CAPITAL*100,IF(CLOSE<REF(CLOSE,1),-VOL/CAPITAL*100,0)),0);
成交额:=V*C/100,NODRAW;
JINGU2:=SUM((IF(((成交额/8>20) AND (CLOSE>(REF(CLOSE,1)))),成交额,0)),0);
JINGU3:=SUM((IF(((成交额/8>20) AND (CLOSE<(REF(CLOSE,1)))),成交额,0)),0);
JINGU4:=SUM((IF(((成交额/8<20) AND (CLOSE>(REF(CLOSE,1)))),成交额,0)),0);
JINGU5:=SUM((IF(((成交额/8<20) AND (CLOSE<(REF(CLOSE,1)))),成交额,0)),0);
JINGU6:=((JINGU2+JINGU3)+JINGU4)+JINGU5;
JINGU7:=IF((ISLASTBAR),((100*JINGU2)/JINGU6),0);
JINGU8:=IF((ISLASTBAR),((100*JINGU3)/JINGU6),0);
JINGU9:=IF((ISLASTBAR),((100*JINGU4)/JINGU6),0);
JINGU10:=IF((ISLASTBAR),((100*JINGU5)/JINGU6),0);
机构买:(JINGU2),LINETHICK6,COLORRED;
机构卖:(JINGU3),LINETHICK6,COLORGREEN;
机构进出:机构买-机构卖,NODRAW;
散户买:(JINGU4),COLOR5555FF;
散户卖:(JINGU5),COLOR55FF55;
强势:((100*JINGU2)/JINGU6>50);
STICKLINE(强势,机构买*1.02,机构买*1.1,1,0),COLORYELLOW;
拉升:((100*JINGU2)/JINGU6-(100*JINGU3)/JINGU6)>18 AND (100*JINGU2)/JINGU6-(100*JINGU5)/JINGU6>18;
STICKLINE(拉升,机构买*1.1,机构买*1.2,1,0),COLORRED;
DRAWTEXT(ISLASTBAR=1,机构买*0.95,''),LINETHICK2,COLORRED;
DRAWTEXT(ISLASTBAR=1,机构卖*0.95,''),LINETHICK2,COLORFFFF55;
Q:=BETWEEN(C/(SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C))),1.05,0.95);
Q2:=IF(Q=0,MA(C,BARSCOUNT(C)),(SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C))));
DRAWICON(CROSS((C/Q2),1.03),机构买,5);
DD1:=1;
AAA1:=STRCAT(STRCAT('机构买入',CON2STR((100*JINGU2)/JINGU6,0)),'%');
AAA2:=STRCAT(STRCAT('机构卖出',CON2STR((100*JINGU3)/JINGU6,0)),'%');
AAA0:=STRCAT(STRCAT('机构总买入',CON2STR((100*(JINGU2-JINGU3))/JINGU6,0)),'%');
AAA3:=STRCAT(STRCAT('散户买入',CON2STR((100*JINGU4)/JINGU6,0)),'%');
AAA4:=STRCAT(STRCAT('散户卖出',CON2STR((100*JINGU5)/JINGU6,0)),'%');
AAA5:=STRCAT(STRCAT('散户总买入',CON2STR((100*(JINGU4-JINGU5))/JINGU6,0)),'%');
DRAWTEXT_FIX(DD1=1,0.001,0.05,0,AAA1),COLORRED;
DRAWTEXT_FIX(DD1=1,0.001,0.15,0,AAA2),COLORGREEN;
DRAWTEXT_FIX(DD1=1,0.001,0.25,0,AAA3),COLORRED;
DRAWTEXT_FIX(DD1=1,0.001,0.35,0,AAA4),COLORGREEN;
DRAWTEXT_FIX(DD1=1,0.001,0.45,0,AAA0),LINETHICK5,COLORCYAN;
DRAWTEXT_FIX(DD1=1,0.001,0.55,0,AAA5),LINETHICK5,COLORCYAN;
版权声明
本文版权归掌上指标所有。
未经许可,不得转载,转载请注明出处!