通达信筹码分析副图指标
超B:=L2_AMO(0,2)/10000.0;
大B:=L2_AMO(1,2)/10000.0;
中B:=L2_AMO(2,2)/10000.0;
小B:=L2_AMO(3,2)/10000.0;
超S:=L2_AMO(0,3)/10000.0;
大S:=L2_AMO(1,3)/10000.0;
中S:=L2_AMO(2,3)/10000.0;
小S:=L2_AMO(3,3)/10000.0;
TESTSKIP(NOT(超B OR 大B OR 中B OR 小B OR 超S OR 大S OR 中S OR 小S)!=0);LC:=REF(CLOSE,1);
WRSI:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;
获利筹码:=CONST(WINNER(C)*100);
SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));
量能饱和:=(IF(SAT>1,1,SAT)*100);
WR10:=(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3))*100;
活跃:=(WRSI-WR10);
活跃度比:=IF(活跃>=0,(活跃+100)/2,100-ABS((活跃-100)/2));
DRAWTEXT_FIX(ISLASTBAR=1,0.83,0.25,1,STRCAT(STRCAT('量能饱和: ',CON2STR(量能饱和,2)),'%')),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR=1,0.83,0.52,1,STRCAT(STRCAT('活跃度比: ',CON2STR(活跃度比,2)),'%')),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR=1,0.83,0.75,1,STRCAT(STRCAT('获利筹码: ',CON2STR(获利筹码,2)),'%')),COLORYELLOW;
DRAWRECTREL(950,470,630,365,RGB(150,10,250));
DRAWRECTREL(950,710,630,610,RGB(150,10,250));
DRAWRECTREL(950,855,630,955,RGB(150,10,250));
DRAWRECTREL(950,470,630+CONST(量能饱和*(950-630)/100),365,RGB(0,100,0));
DRAWRECTREL(790,470,790,365,RGB(0,0,10));
DRAWRECTREL(950,710,630+CONST(活跃度比*(950-630)/100),610,RGB(0,100,0));
DRAWRECTREL(790,710,790,610,RGB(0,0,10));
DRAWRECTREL(950,855,630+CONST(获利筹码*(950-630)/100),955,RGB(0,100,0));
DRAWRECTREL(790,855,790,955,RGB(0,0,10));
总涨幅周期:=350;
高点位:=REFDATE(HHV(H,总涨幅周期),DATE);
低点位:=REFDATE(LLV(L,总涨幅周期),DATE);
低位价:=REF(L,BARSLAST(低点位=L)),COLORGREEN,NODRAW;
高位价:=REF(H,BARSLAST(高点位=H)),COLORRED,NODRAW;
曾最大涨幅:=(高位价-低位价)/低位价*100;
当前涨幅:=(C-低位价)/低位价*100;
ZFA:=CON2STR(CONST(曾最大涨幅),2);
ZFB:=CON2STR(CONST(当前涨幅),2);
ZFC:=STRCAT('【曾最大涨幅】:',ZFA);
ZFD:=STRCAT(ZFC,'%');
ZFE:=STRCAT(ZFD,'【当前总涨幅】:');
ZFF:=STRCAT(ZFE,ZFB);
ZFG:=STRCAT(ZFF,'%');
{DRAWTEXT_FIX(ISLASTBAR,0.73,0.345,0,''),COLORRED;
DRAWTEXT_FIX(ISLASTBAR,0.73,0.345,0,ZFG),COLORYELLOW};
AA1X:=SUM(IF(CLOSE>REF(CLOSE,1),VOL/CAPITAL*100,IF(CLOSE<REF(CLOSE,1),-
VOL/CAPITAL*100,0)),0)};
成交额:=V*C/100,NODRAW;{万元}
AA2X:=SUM((IF(((成交额/8>20) AND (CLOSE>(REF(CLOSE,1)))),成交额,0)),0);
AA3X:=SUM((IF(((成交额/8>20) AND (CLOSE<(REF(CLOSE,1)))),成交额,0)),0);
AA4X:=SUM((IF(((成交额/8<20) AND (CLOSE>(REF(CLOSE,1)))),成交额,0)),0);
AA5X:=SUM((IF(((成交额/8<20) AND (CLOSE<(REF(CLOSE,1)))),成交额,0)),0);
AA6X:=((AA2X+AA3X)+AA4X)+AA5X;
DD1X:=1;
AAA1:=STRCAT(STRCAT('机构持有',CON2STR((100*AA2X)/AA6X,0)),'%');
AAA2:=STRCAT(STRCAT('散户持有',CON2STR((100*AA3X)/AA6X,0)),'%');
DRAWTEXT_FIX(1,0.83,0,1,'《★筹码分析★》'),COLORRED;
DRAWTEXT_FIX(DD1X=1,0.63,0,0,AAA1),COLORMAGENTA;
DRAWTEXT_FIX(DD1X=1,0.89,0,0,AAA2),COLORGREEN;
VARA5:=CONST(AA2X/AA6X*100);
DRAWRECTREL(950,220,630,115,RGB(150,10,250));
DRAWRECTREL(950,220,630+CONST(VARA5*(950-630)/100),115,RGB(0,100,0));
DRAWRECTREL(790,220,790,115,RGB(0,0,10));
大宗进:=(超B)+(大B),NODRAW;
大宗出:=(超S)+(大S),NODRAW;
非大宗进:=(中B)+(小B),NODRAW;
非大宗出:=(中S)+(小S),NODRAW;
DAZHIV:=CONST(MAX(ABS(大宗进),MAX(ABS(大宗出),MAX(ABS(非大宗进),ABS(非大宗出))))),NODRAW;
DRAWRECTREL(0,CONST(950-(ABS(大宗进)*250/DAZHIV))-20,30,950,IF(CONST(大宗进>0),RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(32,CONST(950-(ABS(大宗出)*250/DAZHIV))-20,62,950,IF(CONST(大宗出>0),RGB(23,125,255),RGB(255,0,0)));
DRAWRECTREL(92,CONST(950-(ABS(非大宗进)*250/DAZHIV))-20,122,950,IF(CONST(非大宗进>0),RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(124,CONST(950-(ABS(非大宗出)*250/DAZHIV))-20,154,950,IF(CONST(非大宗出>0),RGB(23,125,255),RGB(255,0,0)));
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.015,1,0,'主力进出'),COLORMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.107,1,0,'散户进出'),COLORCYAN;
- 上一篇公式:通达信买卖决策王副图指标
- 下一篇公式:通达信反弹副图指标源码