分时主图
时长:=if(HOUR>=10 AND HOUR<15 ,1,0);{10点至 15点}
DRAWTEXTABS(0,5,'【板块】'+SelfString('行业')),Color808000,linethick1;
DRAWTEXTABS(110,5,'【地域】'+SelfString('地域')),Color77aa77,linethick1;
DRAWTEXTABS(200,5,'【概念】'+SelfString('概念')),Colorff6699,linethick1;
{叠加大盘线}
{TC:=STRCMP(STRLEFT(MARKETLABEL,2),'SZ');
DPSH:="SH000001$CLOSE"/HHV(STKINDI('SH000001','FYYY.昨收#DAY'),0);
DPSZ:="SZ399001$CLOSE"/HHV(STKINDI('SZ399001','FYYY.昨收#DAY'),0);
DPC:=IF(INBLOCK('A股板块'),DYNAINFO(3)*IF(TC=0,DPSZ,DPSH),C);
POLYLINE(C>0,DPC),COLOR3399ff,LINETHICK1,LAYER0;
大盘:=NUMTOSTRN(INDEXC,2);
DRAWTEXT( BARSTATUS=2,DPC ,'大盘:'+大盘),Color3399ff;}
均线:=IF(BETWEEN(C/(SUM(AMOUNT,0)/SUM(VOL*100,0)),1.05,0.95)=0,MA(C,0),(SUM(AMOUNT,0)/SUM(VOL*100,0)));
均线H:(均线*1.007 ),COLORFF6600,LINETHICK0,LAYER0;
均线L:(均线/1.005 ),COLOR00FF00,LINETHICK0;
{FILLRGN(均线L,均线,c>均线L and c<均线H),COLORYELLOW;}
均线横盘:=C<均线H and C>均线L;
量比:=sum(vol,0)*240/dynainfo(38)/barscount(c);
量比5分钟:=sum(量比,5);
量比10:=sum(量比,10);
上个5分钟量比:=量比10-量比5分钟;
放量:=sum(VOL,6)>REF(ma(VOL,30),1)*10;
CC:CLOSE,COLORWHITE,LINETHICK2;
partline(CC,CC>=ref(CC,1),rgb(255,151,255),CC
DYNAINFO(5),DOTLINE,colorff00ff;
DYNAINFO(6),DOTLINE,color00ff00;
{最新价:=NUMTOSTRN(DYNAINFO(7),2);
涨幅:=NUMTOSTRN(DYNAINFO(14)*100,2);
DRAWTEXT( BARSTATUS=2,CC ,' 最新价:'+最新价+' 涨幅:'+涨幅+'%'),Colorffffff;
均价:=NUMTOSTRN(DYNAINFO(11),2);
DRAWTEXT( BARSTATUS=2,均线 ,'均价:'+均价),Color00ffff;}
横盘:=((HHV(CLOSE,BARSCOUNT(CLOSE))-LLV(CLOSE,BARSCOUNT(CLOSE)))/CLOSE)<1;
横涨:量比5分钟>上个5分钟量比 and 横盘 and 时长 and 放量 and (CC>均线H) and DYNAINFO(22)
DRAWTEXT(CROSS(横涨,0),均线,'▲'),COLORRED,LAYER0;
突破:FILTER(横涨,100),LINETHICK0;
下破:=FILTER(横跌,50);
DRAWTEXT(突破,均线H,'★突破'),COLORFF00FF,LAYER0;
DRAWTEXT(下破,均线L,'★下破'),COLOR00FF00,LAYER0;
VERTLINE(突破,3),COLORFF00FF,LINETHICK3;
VERTLINE(下破,3),COLOR00FF00,LINETHICK3;
RC:=DYNAINFO( 3);
S2:=SMA(C,2,1);
S6:=SMA(C,3,1);
DK:=3*(S2-S6);
STICKLINE(DK>0,RC,(RC+DK),0,1),COLORRED;
STICKLINE(DK<0,RC,(RC+DK),0,1),COLORgreen;
MA30:=EMA(CLOSE,30);
强弱界定:=EMA(CLOSE,900);
{STICKLINE((MA30>强弱界定),MA30,强弱界定,1,0),Color0000FF;
STICKLINE((MA30<强弱界定),MA30,强弱界定,1,0),Color00FF00;}
DRAWICON(CROSS(MA30,强弱界定),H,7),LAYER0;
H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
阻力:L1+P1*7/8,COLORYELLOW,LINETHICK0;
支撑:L1+P1*0.5/8,COLORff00ff,LINETHICK0;
DRAWTEXTABS(0,20,'阻力:'+NUMTOSTRN(阻力,2)),LINETHICK2,ColorYELLOW;
DRAWTEXTABS(0,35,'支撑:'+NUMTOSTRN(支撑,2)),LINETHICK2,Colorff00ff;
{有庄显示}
VAR1:=EMA(EMA(CLOSE,13),13);
控盘:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;
BTJ2:=控盘>REF(控盘,1) AND 控盘<-0.2;
JJ:=DYNAINFO(11);
P:=55;S:=8;M1:=3;
财:=(EMA(CLOSE,S)-EMA(CLOSE,P))*10;
神:=EMA(财,M1);
BTJ3:=CROSS(财,神) AND 财<-0.3;
BTJ11:=(C-JJ)/JJ<-0.03;
有庄:FILTER(BTJ11 AND BTJ2 AND BTJ3,13),linethick0;{BTJ811}
VERTLINE(有庄,1),coloryellow;
DRAWTEXT(有庄,均线L,'★有庄'),COLOR00FFFF,LAYER0;
{DRAWTEXTABS(10,180,'■所属板块:'+BKNAME),ColorYELLOW,linethick1;
流通盘大小:=FINANCE2(37)/1000000*100;
DRAWTEXTABS(280,200,'流通盘大小:'+NUMTOSTRN(流通盘大小,2)+'亿'),LINETHICK1,ColorYELLOW;
每股收益:=FINANCE2(3);
每股市盈率:=DYNAINFO(39);
每股净资产:=FINANCE2(4);
销售毛利率:=FINANCE2(12);
主营收入同比:=FINANCE2(11);
净利润同比增长:=FINANCE2(10);
DRAWTEXTABS(170,200,'每股收益:'+NUMTOSTRN(每股收益,2)+'元'),COLOR00FF00;
DRAWTEXTABS(170,220,'每股市盈率:'+NUMTOSTRN(每股市盈率,1)+'倍'),COLORRED;
DRAWTEXTABS(170,240,'每股净资产:'+NUMTOSTRN(每股净资产,2)+'元'),COLORRED;
DRAWTEXTABS(20,200,'销售毛利率:'+NUMTOSTRN(销售毛利率,2)+'%'),LINETHICK1,COLOR00FF00;
DRAWTEXTABS(20,220,'主营收入同比增长:'+NUMTOSTRN(主营收入同比,2)+'%'),LINETHICK1,COLOR00FF00;
DRAWTEXTABS(20,240,'净利润同比增长:'+NUMTOSTRN(净利润同比增长,2)+'%'),LINETHICK1,COLOR00FF00;};
{分时超赢}
ZLLR:=SUM((AMOUNT*(DYNAINFO(95)+DYNAINFO(94))/10000),0);
ZLLC:=SUM((AMOUNT*(DYNAINFO(98)+DYNAINFO(97))/10000),0);
主净:ZLLR-ZLLC,COLOR00FFFF,LINETHICK0,PRECIS2;
TDLR:=SUM((AMOUNT*DYNAINFO(95)/10000),0);
TDLC:=SUM((AMOUNT*DYNAINFO(98)/10000),0);
超净:TDLR-TDLC,COLORFF00FF,LINETHICK0,PRECIS2;
DDLR:=SUM((AMOUNT*DYNAINFO(94)/10000),0);
DDLC:=SUM((AMOUNT*DYNAINFO(97)/10000),0);
大净:DDLR-DDLC,COLOR00FF00,LINETHICK0,PRECIS2;
ZDLR:=SUM((AMOUNT*DYNAINFO(93)/10000),0);
ZDLC:=SUM((AMOUNT*DYNAINFO(96)/10000),0);
中净:ZDLR-ZDLC,COLORB5B5B5,LINETHICK0,PRECIS2;
XDLR:=IF(AMOUNT*(DYNAINFO(95)+DYNAINFO(94)+DYNAINFO(93))>0,SUM(((AMOUNT-AMOUNT*(DYNAINFO(95)+DYNAINFO(94)+DYNAINFO(93)))/10000),0),0);
XDLC:=IF(AMOUNT*(DYNAINFO(98)+DYNAINFO(97)+DYNAINFO(96))>0,SUM(((AMOUNT-AMOUNT*(DYNAINFO(98)+DYNAINFO(97)+DYNAINFO(96)))/10000),0),0);
散净:XDLR-XDLC,COLORFF9911,LINETHICK0;
{画柱图};
最大值:=200/(MAX(散净,中净,大净,超净,主净));
散户净买:=600-(ABS(散净)*最大值);
中户净买:=600-(ABS(中净)*最大值);
大户净买:=600-(ABS(大净)*最大值);
超大净买:=600-(ABS(超净)*最大值);
主力净买:=600-(ABS(主净)*最大值);
{各单增减比例显示}
ZLB:=SUM((ORDERVOL(1,2)/CAPITAL*100),0);
ZLS:=SUM((ORDERVOL(2,2)/CAPITAL*100),0);
主增:=ZLB-ZLS;
TDB:=SUM((ORDERVOL(1,3)/CAPITAL*100),0);
TDS:=SUM((ORDERVOL(2,3)/CAPITAL*100),0);
超增:=TDB-TDS;
DDB:=SUM(((ORDERVOL(1,2)/CAPITAL*100-ORDERVOL(1,3)/CAPITAL*100)),0);
DDS:=SUM(((ORDERVOL(2,2)/CAPITAL*100-ORDERVOL(2,3)/CAPITAL*100)),0);
大增:=DDB-DDS;
ZDB:=SUM(((ORDERVOL(1,1)/CAPITAL*100-ORDERVOL(1,2)/CAPITAL*100)),0);
ZDS:=SUM(((ORDERVOL(2,1)/CAPITAL*100-ORDERVOL(2,2)/CAPITAL*100)),0);
中增:=ZDB-ZDS;
XDB:=SUM(((VOL-ORDERVOL(1,1))/CAPITAL*100),0);
XDS:=SUM(((VOL-ORDERVOL(2,1))/CAPITAL*100),0);
散增:=XDB-XDS;
{DRAWRECTREL(330,主力买,350,610,RGB(200,0,0)),COLOR000000,LAYER5;
DRAWRECTREL(350,主力卖,370,610,RGB(0,200,0)),COLOR000000,LAYER5;}
DRAWRECTREL(640,主力净买,670,640,(IF((主净 >= 0),RGB(255,0,0),RGB(0,255,0)))),COLOR000000,LAYER5;
{DRAWRECTREL(445,超大买,465,610,RGB(200,0,0)),COLOR000000,LAYER5;
DRAWRECTREL(465,超大卖,485,610,RGB(0,200,0)),COLOR000000,LAYER5;}
DRAWRECTREL(720,超大净买,750,640,(IF((超净 >= 0),RGB(200,0,255),RGB(0,255,255)))),COLOR000000,LAYER5;
{DRAWRECTREL(560,大户买,580,610,RGB(200,0,0)),COLOR000000,LAYER5;
DRAWRECTREL(580,大户卖,600,610,RGB(0,200,0)),COLOR000000,LAYER5;}
DRAWRECTREL(800,大户净买,830,640,(IF((大净 >= 0),RGB(200,0,255),RGB(0,255,255)))),COLOR000000,LAYER5;
{DRAWRECTREL(675,中户买,695,610,RGB(200,0,0)),COLOR000000,LAYER5;
DRAWRECTREL(695,中户卖,715,610,RGB(0,200,0)),COLOR000000,LAYER5;}
DRAWRECTREL(880,中户净买,910,640,(IF((中净 >= 0),RGB(200,0,255),RGB(0,255,255)))),COLOR000000,LAYER5;
{DRAWRECTREL(790,散户买,810,610,RGB(200,0,0)),COLOR000000,LAYER5;
DRAWRECTREL(810,散户卖,830,610,RGB(0,200,0)),COLOR000000,LAYER5;}
DRAWRECTREL(960,散户净买,990,640,(IF((散净 >= 0),RGB(200,0,255),RGB(0,255,255)))),COLOR000000,LAYER5;
{DRAWRECTREL( 330,620,390,635,RGB(255,255,0));
DRAWRECTREL( 445,620,505,635,RGB(255,0,255));
DRAWRECTREL( 560,620,620,635,RGB(0,200,0));
DRAWRECTREL( 675,620,735,635,RGB(200,200,200));
DRAWRECTREL( 790,620,850,635,RGB(0,0,200));}
DRAWTEXTREL(600,530,'主'),ColorDDFFFF;
DRAWTEXTREL(600,600,'力'),ColorDDFFFF;
DRAWTEXTREL(680,530,'机'),ColorDDFFFF;
DRAWTEXTREL(680,600,'构'),ColorDDFFFF;
DRAWTEXTREL(760,530,'大'),ColorDDFFFF;
DRAWTEXTREL(760,600,'户'),ColorDDFFFF;
DRAWTEXTREL(840,530,'中'),ColorDDFFFF;
DRAWTEXTREL(840,600,'户'),ColorDDFFFF;
DRAWTEXTREL(920,530,'散'),ColorDDFFFF;
DRAWTEXTREL(920,600,'户'),ColorDDFFFF;
{DRAWTEXTREL(500,680,'净买'),COLORFFFF00;
DRAWTEXTREL(500,740,'增减'),COLOR00FFFF;
DRAWTEXTREL(600,680,NUMTOSTRN(主净,0)),COLORFFFF00;
DRAWTEXTREL(600,740,NUMTOSTRN(主增,2)),COLOR00FFFF;
DRAWTEXTREL(690,680,NUMTOSTRN(超净,0)),COLORFFFF00;
DRAWTEXTREL(690,740,NUMTOSTRN(超增,2)),COLOR00FFFF;
DRAWTEXTREL(780,680,NUMTOSTRN(大净,0)),COLORFFFF00;
DRAWTEXTREL(780,740,NUMTOSTRN(大增,2)),COLOR00FFFF;
DRAWTEXTREL(860,680,NUMTOSTRN(中净,0)),COLORFFFF00;
DRAWTEXTREL(860,740,NUMTOSTRN(中增,2)),COLOR00FFFF;
DRAWTEXTREL(940,680,NUMTOSTRN(散净,0)),COLORFFFF00;
DRAWTEXTREL(940,740,NUMTOSTRN(散增,2)),COLOR00FFFF;
DRAWTEXTREL(500,800,'买入'),colorred;
DRAWTEXTREL(500,860,'卖出'),Color00FF00;
DRAWTEXTREL(590,800,NUMTOSTRN(ZLLR,0)),colorred;
DRAWTEXTREL(590,860,NUMTOSTRN(ZLLC,0)),COLOR00FF00;
DRAWTEXTREL(680,800,NUMTOSTRN(TDLR,0)),colorred;
DRAWTEXTREL(680,860,NUMTOSTRN(TDLC,0)),COLOR00FF00;
DRAWTEXTREL(780,800,NUMTOSTRN(DDLR,0)),colorred;
DRAWTEXTREL(780,860,NUMTOSTRN(DDLC,0)),COLOR00FF00;
DRAWTEXTREL(860,800,NUMTOSTRN(ZDLR,0)),colorred;
DRAWTEXTREL(860,860,NUMTOSTRN(ZDLC,0)),COLOR00FF00;
DRAWTEXTREL(940,800,NUMTOSTRN(XDLR,0)),colorred;
DRAWTEXTREL(940,860,NUMTOSTRN(XDLC,0)),COLOR00FF00;}
DRAWTEXTREL(530,680,'净买'),COLORFFFF00;
DRAWTEXTREL(530,740,'增减'),COLOR00FFFF;
DRAWTEXTREL(600,680,NUMTOSTRN(主净,0)),COLORFFFF00;
DRAWTEXTREL(600,740,NUMTOSTRN(主增,2)),COLOR00FFFF;
DRAWTEXTREL(690,680,NUMTOSTRN(超净,0)),COLORFFFF00;
DRAWTEXTREL(690,740,NUMTOSTRN(超增,2)),COLOR00FFFF;
DRAWTEXTREL(780,680,NUMTOSTRN(大净,0)),COLORFFFF00;
DRAWTEXTREL(780,740,NUMTOSTRN(大增,2)),COLOR00FFFF;
DRAWTEXTREL(860,680,NUMTOSTRN(中净,0)),COLORFFFF00;
DRAWTEXTREL(860,740,NUMTOSTRN(中增,2)),COLOR00FFFF;
DRAWTEXTREL(940,680,NUMTOSTRN(散净,0)),COLORFFFF00;
DRAWTEXTREL(940,740,NUMTOSTRN(散增,2)),COLOR00FFFF;
DRAWTEXTREL(530,800,'买入'),colorred;
DRAWTEXTREL(530,860,'卖出'),Color00FF00;
DRAWTEXTREL(600,800,NUMTOSTRN(ZLLR,0)),colorred;
DRAWTEXTREL(600,860,NUMTOSTRN(ZLLC,0)),COLOR00FF00;
DRAWTEXTREL(700,800,NUMTOSTRN(TDLR,0)),colorred;
DRAWTEXTREL(700,860,NUMTOSTRN(TDLC,0)),COLOR00FF00;
DRAWTEXTREL(780,800,NUMTOSTRN(DDLR,0)),colorred;
DRAWTEXTREL(780,860,NUMTOSTRN(DDLC,0)),COLOR00FF00;
DRAWTEXTREL(860,800,NUMTOSTRN(ZDLR,0)),colorred;
DRAWTEXTREL(860,860,NUMTOSTRN(ZDLC,0)),COLOR00FF00;
DRAWTEXTREL(940,800,NUMTOSTRN(XDLR,0)),colorred;
DRAWTEXTREL(940,860,NUMTOSTRN(XDLC,0)),COLOR00FF00;
{DRAWTEXTREL(530,900,'Z入'),colorred;
DRAWTEXTREL(530,960,'Z出'),Color00FF00;
DRAWTEXTREL(600,900,NUMTOSTRN(ZLB,2)),colorred;
DRAWTEXTREL(600,960,NUMTOSTRN(ZLS,2)),COLOR00FF00;
DRAWTEXTREL(700,900,NUMTOSTRN(TDB,2)),colorred;
DRAWTEXTREL(700,960,NUMTOSTRN(TDS,2)),COLOR00FF00;
DRAWTEXTREL(780,900,NUMTOSTRN(DDB,2)),colorred;
DRAWTEXTREL(780,960,NUMTOSTRN(DDS,2)),COLOR00FF00;
DRAWTEXTREL(860,900,NUMTOSTRN(ZDB,2)),colorred;
DRAWTEXTREL(860,960,NUMTOSTRN(ZDS,2)),COLOR00FF00;
DRAWTEXTREL(940,900,NUMTOSTRN(XDB,2)),colorred;
DRAWTEXTREL(940,960,NUMTOSTRN(XDS,2)),COLOR00FF00;};
副图1
主力:SUM((AMOUNT*(DYNAINFO(95)+DYNAINFO(94))/10000),0)-SUM((AMOUNT*(DYNAINFO(98)+DYNAINFO(97))/10000),0),PRECIS0,coloryellow,linethick2,layer7;
机构:SUM((AMOUNT*DYNAINFO(95)/10000),0)-SUM((AMOUNT*DYNAINFO(98)/10000),0),PRECIS0,colorred,linethick2;
大户:SUM((AMOUNT*DYNAINFO(94)/10000),0)-SUM((AMOUNT*DYNAINFO(97)/10000),0),PRECIS0,color1e90ff,layer0;
中户:SUM((AMOUNT*DYNAINFO(93)/10000),0)-SUM((AMOUNT*DYNAINFO(96)/10000),0),PRECIS0,Colorff7f50,linethick1;
散户:SUM(((AMOUNT-AMOUNT*(DYNAINFO(95)+DYNAINFO(94)+DYNAINFO(93)))/10000),0)-SUM(((AMOUNT-AMOUNT*(DYNAINFO(98)+DYNAINFO(97)+DYNAINFO(96)))/10000),0),PRECIS0,colorgreen,linethick1;
DRAWTEXT( BARSTATUS=2,机构 ,'机构' ),Colorred;
DRAWTEXT( BARSTATUS=2,大户 ,'大户' ),Color1e90ff;
DRAWTEXT( BARSTATUS=2,主力 ,'主力' ),Coloryellow;
DRAWTEXT( BARSTATUS=2,中户 ,'中户' ),Colorff7f50;
DRAWTEXT( BARSTATUS=2,散户 ,'散户' ),Colorgreen;
B:1.2*MIN(机构,大户,中户,散户,主力),Colorblack;
ZJ:=DYNAINFO(10)/10000;
DRAWTEXTABS(0,0,'主力资金流入:'+numtostrn(主力,0)+'万 占当日 '+numtostrn((主力/ZJ)*100,2)+'%'),Colorffffff,precis0;
{机构买:(ORDERVOL(1,3)-ORDERVOL(2,3))*AMOUNT/V/10000,PRECIS1,colormagenta,linethick0;
大户买:((ORDERVOL(1,2)-ORDERVOL(1,3))-(ORDERVOL(2,2)-ORDERVOL(2,3)))*AMOUNT/V/10000,PRECIS1,colorcyan,linethick0;}
{drawtextabs(0,0,'机构买 '+机构买+'万'),COLORmagenta;
drawtextabs(0,10,'大户买 '+大户买+'万'),COLORcyan;}
{DRAWTEXT( BARSTATUS=2,机构买 ,'机构买' ),Color00ffff;
DRAWTEXT( BARSTATUS=2,大户买 ,'大户买' ),Colorffff00,LAYER6;};
买卖:=((sum(if(time>93000,transactvol(1,0),0),0)-sum(if(time>93000,transactvol(2,0),0),0))/(sum(if(time>93000,transactvol(1,0),0),0)+sum(if(time>93000,transactvol(2,0),0),0)));
k8:=barslast(sum(if(time>93000,transactnum(1,0)-transactnum(2,0),0),0)>llv(sum(if(time>93000,transactnum(1,0)-transactnum(2,0),0),0),0))<3 and barslast(sum(if(time>93000,ORDERNUM(2,0)-ORDERNUM(1,0),0),0)>llv(sum(if(time>93000,ORDERNUM(2,0)-ORDERNUM(1,0),0),0),0))<3;
k11:=barslast(sum(if(time>93000,transactnum(1,0)-transactnum(2,0),0),0)>0)<3 and barslast(sum(if(time>93000,ORDERNUM(2,0)-ORDERNUM(1,0),0),0)>0)<3;
k14:=barslast(sum(if(time>93000,transactnum(1,0)-transactnum(2,0),0),0)>=hhv(sum(if(time>93000,transactnum(1,0)-transactnum(2,0),0),0),0))<3 and barslast(sum(if(time>93000,ORDERNUM(2,0)-ORDERNUM(1,0),0),0)>=hhv(sum(if(time>93000,ORDERNUM(2,0)-ORDERNUM(1,0),0),0),0))<3;
k17:=high/dynainfo(4)<(1+3/100);
k22:=barslast(cross(买卖,0))<3 and LAST(买卖>0)>1;
k23:=barslast(cross(sum(if(time>93000,transactnum(1,0)-transactnum(2,0),0),0),sum(if(time>93000,ORDERNUM(2,0)-ORDERNUM(1,0),0),0)))<3;
k25:=FILTER(k17 and k22 and k23 and k14 and k8 and k11,0);
vertline(k25,4),LINETHICK3,coloryellow;
DRAWTEXT(k25,0,'★有庄'),COLORFF00FF,LAYER0;
副图2
ZLLR:DYNAINFO(94)+DYNAINFO(95),linethick0;
ZLLC:DYNAINFO(97)+DYNAINFO(98),linethick0;
ZLJ:(ZLLR-ZLLC)*AMOUNT/10000,linethick0;
ZL:(ZLJ-REF(ZLJ,1))*20,colorstick;
ZL累积:SUM(ZLJ,0),coloryellow,linethick2;
ZJ:=DYNAINFO(10)/10000;
DRAWTEXTABS(0,0,'主力资金流入:'+numtostrn(ZL累积,0)+'万 占当日 '+numtostrn((ZL累积/ZJ)*100,2)+'%'),Colorffffff,precis0;
DRAWTEXT( BARSTATUS=2,ZL累积 ,'大户 '+NUMTOSTRN(ZL累积,0)+'万' ),Coloryellow;
B:1.3*ZL累积,Colorblack;