板块指数:=IF(INBLOCK('工程建筑'),"991002$CLOSE",
IF(INBLOCK('电力'),"991003$CLOSE",
IF(INBLOCK('计算机'),"991004$CLOSE",
IF(INBLOCK('电子信息'),"991006$CLOSE",
IF(INBLOCK('房地产'),"991007$CLOSE",
IF(INBLOCK('纺织服装'),"991008$CLOSE",
IF(INBLOCK('钢铁'),"991009$CLOSE",
IF(INBLOCK('供水供气'),"991010$CLOSE",
IF(INBLOCK('化工化纤'),"991011$CLOSE",
IF(INBLOCK('电器'),"991014$CLOSE",
IF(INBLOCK('交通设施'),"991016$CLOSE",
IF(INBLOCK('银行类'),"991017$CLOSE",
IF(INBLOCK('旅游酒店'),"991018$CLOSE",
IF(INBLOCK('煤炭石油'),"991019$CLOSE",
IF(INBLOCK('酿酒食品'),"991020$CLOSE",
IF(INBLOCK('农林牧渔'),"991021$CLOSE",
IF(INBLOCK('商业连锁'),"991023$CLOSE",
IF(INBLOCK('建材'),"991024$CLOSE",
IF(INBLOCK('其他行业'),"991025$CLOSE",
IF(INBLOCK('汽车类'),"991026$CLOSE",
IF(INBLOCK('机械'),"991027$CLOSE",
IF(INBLOCK('医药'),"991028$CLOSE",
IF(INBLOCK('外贸'),"991031$CLOSE",
IF(INBLOCK('教育传媒'),"991032$CLOSE",
IF(INBLOCK('仪电仪表'),"991033$CLOSE",
IF(INBLOCK('有色金属'),"991034$CLOSE",
IF(INBLOCK('造纸印刷'),"991035$CLOSE",
IF(INBLOCK('券商'),"991036$CLOSE",
IF(INBLOCK('电力设备'),"991037$CLOSE",
IF(INBLOCK('通信'),"991135$CLOSE",
IF(INBLOCK('运输物流'),"991136$CLOSE",
IF(INBLOCK('保险'),"991255$CLOSE",0)
)))))))))))))))))))))))))))))));
板块涨幅:=SUM(板块指数/REF(板块指数,1)*100-100,1);
板块:=IFS(INBLOCK('工程建筑'),'工程建筑',
IFS(INBLOCK('电力'),'电力',
IFS(INBLOCK('计算机'),'计算机',
IFS(INBLOCK('电子信息'),'电子信息',
IFS(INBLOCK('房地产'),'房地产',
IFS(INBLOCK('纺织服装'),'纺织服装',
IFS(INBLOCK('钢铁'),'钢铁',
IFS(INBLOCK('供水供气'),'供水供气',
IFS(INBLOCK('化工化纤'),'化工化纤',
IFS(INBLOCK('电器'),'电器',
IFS(INBLOCK('交通设施'),'交通设施',
IFS(INBLOCK('银行类'),'银行类',
IFS(INBLOCK('旅游酒店'),'旅游酒店',
IFS(INBLOCK('煤炭石油'),'煤炭石油',
IFS(INBLOCK('酿酒食品'),'酿酒食品',
IFS(INBLOCK('农林牧渔'),'农林牧渔',
IFS(INBLOCK('商业连锁'),'商业连锁',
IFS(INBLOCK('建材'),'建材',
IFS(INBLOCK('其他行业'),'其他行业',
IFS(INBLOCK('汽车类'),'汽车类',
IFS(INBLOCK('机械'),'机械',
IFS(INBLOCK('医药'),'医药',
IFS(INBLOCK('外贸'),'外贸',
IFS(INBLOCK('教育传媒'),'教育传媒',
IFS(INBLOCK('仪电仪表'),'仪电仪表',
IFS(INBLOCK('有色金属'),'有色金属',
IFS(INBLOCK('造纸印刷'),'造纸印刷',
IFS(INBLOCK('券商'),'券商',
IFS(INBLOCK('电力设备'),'电力设备',
IFS(INBLOCK('通信'),'通信',
IFS(INBLOCK('运输物流'),'运输物流',
IFS(INBLOCK('保险'),'保险','')
)))))))))))))))))))))))))))))));
DRAWTEXTABS(0,38,'大盘指数:'+INDEXC+''),LINETHICK0,COLORFF00FF;
DRAWTEXTABS(0,52,'大盘涨跌:'+INDEXC- REF(INDEXC,1)),LINETHICK0,PRECIS2,COLORFFFF00;
DRAWTEXTABS(225,38,'大盘涨幅:'+((INDEXC- REF(INDEXC,1))/REF(INDEXC,1)*100)+'%'),LINETHICK0,PRECIS2,COLORred;
DRAWTEXTABS(0,66,'上涨家数:'+NUMTOSTRN(DYNAINFO(69),0)),COLOR0000FF;
DRAWTEXTABS(0,80,'下跌家数:'+NUMTOSTRN(DYNAINFO(70),0)),COLOR00FF00;
DRAWTEXTABS(0,94,'平盘家数:'+NUMTOSTRN(DYNAINFO(71),0)),COLORFFFFFF;
DRAWTEXTABS(0,112,'股票代码: '+STKLABEL+''),LINETHICK1,COLORFFFF00;
DRAWTEXTABS(0,126,'股票名称:'+STKNAME+''),LINETHICK1,COLORFFFF00;
DRAWTEXTABS(0,140,'所属板块:'+ 板块),COLOR00FFFF;
DRAWTEXTABS(0,154,'板块指数:'+ 板块指数),PRECIS2,COLOR00FFFF;
DRAWTEXTABS(0,168,'板块涨跌:'+ 板块指数-REF(板块指数,1)),PRECIS2,COLOR00FFFF;
DRAWTEXTABS(342,38,'板块涨幅:'+ 板块涨幅+'%'),PRECIS2,COLOR00FFFF;
DRAWTEXTABS(0,185,'最新股价:'+DYNAINFO(7)+'元'),COLORFF00FF;
DRAWTEXTABS(460,38,'个股涨幅:'+DYNAINFO(14)*100+'%'),COLORFF00FF,PRECIS2;
DRAWTEXTABS(0,199,'今日涨跌:'+C-REF(C,1)+'元'),COLORFFFF00,PRECIS2;
DRAWTEXTABS(0,213,'换 手 率:'+VOL/CAPITAL* 100),COLORFF00FF,PRECIS2;
DRAWTEXTABS(0,257,'历史最高价:'+HHV(HIGH,0)),Colorred,LINETHICK0;
DRAWTEXTABS(0,272,'历史最低价:'+LLV(LOW,0)),COLOR00FF00,LINETHICK0;
TODAY:=("DDY.DDY")=0; {判断是否有正版数据}
{叠加大盘线}
{TC:=STRCMP(STRLEFT(MARKETLABEL,2),'SZ');
DPSH:="SH000001$CLOSE"/HHV(STKINDI('SH000001','分超引用.昨收#DAY'),0);
DPSZ:="399001$CLOSE"/HHV(STKINDI('399001','分超引用.昨收#DAY'),0);
DPC:=IF(INBLOCK('A股板块'),DYNAINFO(3)*IF(TC=0,DPSZ,DPSH),C);
POLYLINE(C>0,DPC),COLORFF00FF,LINETHICK2,LAYER0;}
{DRAWTEXTABS(90,5,TC);}
{分时超赢}
HS:=vol/capital;
ZLB:=IF(TODAY,"[email=DDEDATA@BIGORDER]DDEDATA@BIGORDER"(1,2),BIGORDER(1,2[/email]));
ZLS:=IF(TODAY,"[email=DDEDATA@BIGORDER]DDEDATA@BIGORDER"(2,2),BIGORDER(2,2[/email]));
TDB:=IF(TODAY,"[email=DDEDATA@BIGORDER]DDEDATA@BIGORDER"(1,3),bigorder(1,3[/email]));
TDS:=IF(TODAY,"[email=DDEDATA@BIGORDER]DDEDATA@BIGORDER"(2,3),bigorder(2,3[/email]));
DDB:=IF(TODAY,"[email=DDEDATA@BIGORDER]DDEDATA@BIGORDER"(1,2)-"DDEDATA@BIGORDER"(1,3),bigorder(1,2)-bigorder(1,3[/email]));
DDS:=IF(TODAY,"[email=DDEDATA@BIGORDER]DDEDATA@BIGORDER"(2,2)-"DDEDATA@BIGORDER"(2,3),bigorder(2,2)-bigorder(2,3[/email]));
ZDB:=IF(TODAY,"[email=DDEDATA@BIGORDER]DDEDATA@BIGORDER"(1,1)-"DDEDATA@BIGORDER"(1,2),bigorder(1,1)-bigorder(1,2[/email]));
ZDS:=IF(TODAY,"[email=DDEDATA@BIGORDER]DDEDATA@BIGORDER"(2,1)-"DDEDATA@BIGORDER"(2,2),bigorder(2,1)-bigorder(2,2[/email]));
XDB:=IF(TODAY,1-"[email=DDEDATA@BIGORDER]DDEDATA@BIGORDER"(1,1),1-bigorder(1,1[/email]));
XDS:=IF(TODAY,1-"[email=DDEDATA@BIGORDER]DDEDATA@BIGORDER"(2,1),1-bigorder(2,1[/email]));
WPB:=sum(if(DYNAINFO(23)*close,DYNAINFO(23),0),0)*0.003906;
NPS:=sum(if(DYNAINFO(22)*close,DYNAINFO(22),0),0)*0.003906;
主动率:=(WPB-NPS)/(NPS+WPB)*100;
单数比:=IF(DYNAINFO(92)/DYNAINFO(91) ,DYNAINFO(92)/DYNAINFO(91) ,0 );
TCL1:=IF(TODAY ,(DDB+TDB ) ,(DYNAINFO(95)+DYNAINFO(94)));
TCL2:=IF(TODAY,(TDS+DDS) ,(DYNAINFO(98)+DYNAINFO(97)) );
{通吃率:=(TCL1-TCL2)*VOL/VOL*100;}
DRAWTEXTABS(0,227,'主 动 率:'+ NUMTOSTRN(主动率,2)),COLOR00FFFF;
DRAWTEXTABS(0,242,'单 数 比:'+ NUMTOSTRN(单数比,2)),COLOR00FFFF;
{DRAWTEXTABS(0,136,'通 吃 率:'+ NUMTOSTRN(通吃率,2)),COLOR00FFFF;}
TDLR:=TDB*AMOUNT/10000;
TDLC:=TDS*AMOUNT/10000;
CJ:=TDLR-TDLC{,COLORFF00FF,LINETHICK0,PRECIS2};
超增:=SUM(TDB,1)-SUM(TDS,1){,COLORFF00FF,LINETHICK0,PRECIS2};
CD:=TDB-TDS;
超大:=HS*CD*100;
CDCC:= 25+Sum(超大,0);
DDLR:=DDB*AMOUNT/10000;
DDLC:=DDS*AMOUNT/10000;
DJ:=DDLR-DDLC{,COLOR00FF00,LINETHICK0,PRECIS2};
大增:=SUM(DDB,1)-SUM(DDS,1){,COLOR00FF00,LINETHICK0,PRECIS2};
DD:=DDB-DDS;
大户:=HS*DD*100;
DHCC:=25+Sum(大户,0);
ZDLR:=ZDB*AMOUNT/10000;
ZDLC:=ZDS*AMOUNT/10000;
ZJ:=ZDLR-ZDLC{,COLORB5B5B5,LINETHICK0,PRECIS2};
中增:=SUM(ZDB,1)-SUM(ZDS,1){,COLORB5B5B5,LINETHICK0,PRECIS2};
ZD:=ZDB-ZDS;
中户:=HS*ZD*100;
ZHCC:= 25+Sum(中户,0);
XDLR:=XDB*AMOUNT/10000;
XDLC:=XDS*AMOUNT/10000;
SJ:=XDLR-XDLC{,COLORFF9911,LINETHICK0,PRECIS2};
散增:=SUM(XDB,1)-SUM(XDS,1){,COLORFF9911,LINETHICK0,PRECIS2};
XD:=XDB-XDS;
散户:=HS*XD*100;
SHCC:= 25+Sum(散户,0);
ZLLR:=ZLB*AMOUNT/10000;
ZLLC:=ZLS*AMOUNT/10000;
主净:ZLLR-ZLLC,COLORred,LINETHICK0,PRECIS2;
主增:=SUM(ZLB,1)-SUM(ZLS,1){,LINETHICK0,PRECIS2,COLOR00FF00};
主力:=超大+大户;
ZLCC:=CDCC+DHCC;
{连红:LAST(主净 > 0),COLORRED,linethick0,PRECIS2;
十日飘红:COUNT(主净 > 0,10),COLORFF00FF,linethick0,PRECIS2;}
占流通盘比:(ZLB-ZLS)*vol/CAPITAL * 100,PRECIS2,linethick0;
{成交量:VOL/100,PRECIS2;}
占成交额比:主净/(AMOUNT/10000) * 100,PRECIS2,linethick0;
占成交量比:主净/AMOUNT * VOL * 100,PRECIS2,linethick0;
DRAWTEXTREL(230,10,'今日主力 '+主净+'万元'),LINETHICK4,Colorred;
DRAWTEXTREL(500,10,'主力连红 '+LAST(主净 > 0)+'天'),LINETHICK4,Color00b5ff;
DRAWTEXTREL(650,10,'十日飚红 '+COUNT(主净 > 0,10)+'天'),LINETHICK4,COLORFF00FF;
二日总资:SUM(主净,2),LINETHICK0,PRECIS2,COLORFF00FF;
三日总资:SUM(主净,3),LINETHICK0,PRECIS2,COLORFFFF00;
四日总资:SUM(主净,4),LINETHICK0,PRECIS2,COLOR00FFFF;
五日总资:SUM(主净,5),LINETHICK0,PRECIS2,COLORFFFF00;
{前六日资金趋势}
DRAWTEXTABS(105,25,'前六日主力资金(万):'),COLORFFFF00;
DRAWTEXTABS(225,25,'前1日:'+ NUMTOSTRN(ref(主净,1),2)),COLOR00FFFF;
DRAWTEXTABS(325,25,'前2日:'+ NUMTOSTRN(ref(主净,2),2)),COLORFF00FF;
DRAWTEXTABS(425,25,'前3日:'+ NUMTOSTRN(ref(主净,3),2)),COLOR00FF00;
DRAWTEXTABS(525,25,'前4日:'+ NUMTOSTRN(ref(主净,4),2)),COLORB5B5B5;
DRAWTEXTABS(625,25,'前5日:'+ NUMTOSTRN(ref(主净,5),2)),COLORFF9911;
DRAWTEXTABS(725,25,'前6日:'+ NUMTOSTRN(ref(主净,6),2)),Color00b5ff;
{画柱图};
ZDZ:=400/(MAX(ZLLR,ZLLC,TDLR,TDLC,DDLR,DDLC,ZDLR,ZDLC,XDLR,XDLC,SJ,ZJ,DJ,CJ, 主净));
主买:=600-(ZLLR*ZDZ);
主卖:=600-(ZLLC*ZDZ);
ZLJM:=500-(ABS(主净)*ZDZ);
超买:=600-(TDLR*ZDZ);
超卖:=600-(TDLC*ZDZ);
CDJB:=500-(ABS(CJ)*ZDZ);
大买:=600-(DDLR*ZDZ);
大卖:=600-(DDLC*ZDZ);
DHJB:=500-(ABS(DJ)*ZDZ);
中买:=600-(ZDLR*ZDZ);
中卖:=600-(ZDLC*ZDZ);
ZHJB:=500-(ABS(ZJ)*ZDZ);
散买:=600-(XDLR*ZDZ);
散卖:=600-(XDLC*ZDZ);
SHJB:=500-(ABS(SJ)*ZDZ);
DRAWRECTREL(280,主买,300,610,RGB(200,0,0)),COLOR000000,LAYER5;
DRAWRECTREL(300,主卖,320,610,RGB(0,200,0)),COLOR000000,LAYER5;
DRAWRECTREL(320,ZLJM,340,610,(IF((主净 >= 0),RGB(255,20,147),RGB(0,250,154)))),COLOR000000,LAYER5;
DRAWRECTREL(410,超买,430,610,RGB(200,0,0)),COLOR000000,LAYER5;
DRAWRECTREL(430,超卖,450,610,RGB(0,200,0)),COLOR000000,LAYER5;
DRAWRECTREL(450,CDJB,470,610,(IF((CJ >= 0),RGB(255,20,147),RGB(0,250,154)))),COLOR000000,LAYER5;
DRAWRECTREL(540,大买,560,610,RGB(200,0,0)),COLOR000000,LAYER5;
DRAWRECTREL(560,大卖,580,610,RGB(0,200,0)),COLOR000000,LAYER5;
DRAWRECTREL(580,DHJB,600,610,(IF((DJ >= 0),RGB(255,20,147),RGB(0,250,154)))),COLOR000000,LAYER5;
DRAWRECTREL(670,中买,690,610,RGB(200,0,0)),COLOR000000,LAYER5;
DRAWRECTREL(690,中卖,710,610,RGB(0,200,0)),COLOR000000,LAYER5;
DRAWRECTREL(710,ZHJB,730,610,(IF((ZJ >= 0),RGB(255,20,147),RGB(0,250,154)))),COLOR000000,LAYER5;
DRAWRECTREL(800,散买,820,610,RGB(200,0,0)),COLOR000000,LAYER5;
DRAWRECTREL(820,散卖,840,610,RGB(0,200,0)),COLOR000000,LAYER5;
DRAWRECTREL(840,SHJB,860,610,(IF((SJ >= 0),RGB(255,20,147),RGB(0,250,154)))),COLOR000000,LAYER5;
{横彩条}
{DRAWRECTREL( 280,620,340,650,RGB(255,255,0));
DRAWRECTREL( 410,620,470,650,RGB(255,0,255));
DRAWRECTREL( 540,620,600,650,RGB(0,200,0));
DRAWRECTREL( 670,620,730,650,RGB(200,200,200));
DRAWRECTREL( 800,620,860,650,RGB(0,0,200));}
{显示文字}
DRAWTEXTREL(260,450,'主'),LINETHICK2,ColorDDFFFF;
DRAWTEXTREL(260,580,'力'),LINETHICK2,ColorDDFFFF;
DRAWTEXTREL(390,450,'机'),LINETHICK2,ColorDDFFFF;
DRAWTEXTREL(390,580,'构'),LINETHICK2,ColorDDFFFF;
DRAWTEXTREL(520,450,'大'),LINETHICK2,ColorDDFFFF;
DRAWTEXTREL(520,580,'户'),LINETHICK2,ColorDDFFFF;
DRAWTEXTREL(650,450,'中'),LINETHICK2,ColorDDFFFF;
DRAWTEXTREL(650,580,'户'),LINETHICK2,ColorDDFFFF;
DRAWTEXTREL(780,450,'散'),LINETHICK2,ColorDDFFFF;
DRAWTEXTREL(780,580,'户'),LINETHICK2,ColorDDFFFF;
DRAWTEXTREL(200,680,'买入(万) '),colorred;
DRAWTEXTREL(200,750,'卖出(万) '),Color00FF00;
DRAWTEXTREL(200,820,'净买(万) '),COLORFF00FF;
DRAWTEXTREL(200,890,'持仓比例 '),COLOR00FFFF;
DRAWTEXTREL(200,960,'增仓比例 '),COLORFFFF00;
{显示数据}
DRAWTEXTREL(280,680,NUMTOSTRN(ZLLR,2)),colorred;
DRAWTEXTREL(280,750,NUMTOSTRN(ZLLC,2)),COLOR00FF00;
DRAWTEXTREL(280,820,NUMTOSTRN(主净,2)),COLORFF00FF;
DRAWTEXTREL(280,890,NUMTOSTRN(ZLCC,2)+'%'),COLOR00FFFF;
DRAWTEXTREL(280,960,NUMTOSTRN(主增,2)+'%'),COLORFFFF00;
DRAWTEXTREL(410,680,NUMTOSTRN(TDLR,2)),colorred;
DRAWTEXTREL(410,750,NUMTOSTRN(TDLC,2)),COLOR00FF00;
DRAWTEXTREL(410,820,NUMTOSTRN(CJ,2)),COLORFF00FF;
DRAWTEXTREL(410,890,NUMTOSTRN(CDCC,2)+'%'),COLOR00FFFF;
DRAWTEXTREL(410,960,NUMTOSTRN(超增,2)+'%'),COLORFFFF00;
DRAWTEXTREL(540,680,NUMTOSTRN(DDLR,2)),colorred;
DRAWTEXTREL(540,750,NUMTOSTRN(DDLC,2)),COLOR00FF00;
DRAWTEXTREL(540,820,NUMTOSTRN(DJ,2)),COLORFF00FF;
DRAWTEXTREL(540,890,NUMTOSTRN(DHCC,2)+'%'),COLOR00FFFF;
DRAWTEXTREL(540,960,NUMTOSTRN(大增,2)+'%'),COLORFFFF00;
DRAWTEXTREL(670,680,NUMTOSTRN(ZDLR,2)),colorred;
DRAWTEXTREL(670,750,NUMTOSTRN(ZDLC,2)),COLOR00FF00;
DRAWTEXTREL(670,820,NUMTOSTRN(ZJ,2)),COLORFF00FF;
DRAWTEXTREL(670,890,NUMTOSTRN(ZHCC,2)+'%'),COLOR00FFFF;
DRAWTEXTREL(670,960,NUMTOSTRN(中增,2)+'%'),COLORFFFF00;
DRAWTEXTREL(800,680,NUMTOSTRN(XDLR,2)),colorred;
DRAWTEXTREL(800,750,NUMTOSTRN(XDLC,2)),COLOR00FF00;
DRAWTEXTREL(800,820,NUMTOSTRN(SJ,2)),COLORFF00FF;
DRAWTEXTREL(800,890,NUMTOSTRN(SHCC,2)+'%'),COLOR00FFFF;
DRAWTEXTREL(800,960,NUMTOSTRN(散增,2)+'%'),COLORFFFF00;
202108211313.jpg
|