主图上标——给大智慧主图添加基本面提示(主图辅助、源码、贴图)
我们这些喜欢倒腾技术指标的人,在选股的时候容易忽视基本面,添加这段源码,可以给主图加上一些盘面提示,在进行技术分析的时候,也关注一下基本面,多增加一层滤网。
这段源码可以添加到任意主图的后面,因为公式里写在后面的语句,可以浮现在最上层,这样就可以覆盖住主图公式前面的画线;源码里面的变量名称基本不会跟其他指标里面的语句冲突的。
感谢周易2000班长帮我解决正负数值用不同颜色显示的问题。
{主图上标}
DRAWRECTABS(0,6,60,25,rgb(235,235,30)),COLORYELLOW;
DRAWTEXTABS(3,10,'先看大盘!'),COLORBLACK,LINETHICK1;
大盘涨跌:=(INDEXC-REF(INDEXC,1))*100/REF(INDEXC,1);
上涨家数:=INDEXADV;
下跌家数:=INDEXDEC;
DRAWTEXTABS(80,10,'大盘涨跌:'),COLORYELLOW,LINETHICK1;
DRAWTEXTABS(150,10,IFS(大盘涨跌>0,'+'+NUMTOSTRN(大盘涨跌,2)+'%','')),COLORRED,LINETHICK1;
DRAWTEXTABS(150,10,IFS(大盘涨跌=0,'+'+NUMTOSTRN(大盘涨跌,2)+'%','')),COLORWHITE,LINETHICK1;
DRAWTEXTABS(150,10,IFS(大盘涨跌<0,NUMTOSTRN(大盘涨跌,2)+'%','')),COLORGREEN,LINETHICK1;
DRAWTEXTABS(210,10,'上涨家数:'+NUMTOSTRN(上涨家数,0)+'家'),COLORYELLOW,LINETHICK1;
DRAWTEXTABS(365,10,'下跌家数:'+NUMTOSTRN(下跌家数,0)+'家'),COLORYELLOW,LINETHICK1;
DRAWTEXTABS(0,30,'■盘面提示:'),COLORYELLOW,LINETHICK1;
DRAWTEXTABS(80,30,STKNAME+' '+STKLABEL),COLORYELLOW,LINETHICK1;
流通盘大小:=FINANCE2(37)/1000000*100;
流通比例:=100*FINANCE2(37)/FINANCE2(35);
DRAWTEXTABS(210,30,'流通市值:'+NUMTOSTRN(流通盘大小,2)+'亿'),COLORYELLOW,LINETHICK1;
DRAWTEXTABS(365,30,'流通比例:'+NUMTOSTRN(流通比例,2)+'%'),COLORYELLOW,LINETHICK1;
每股净资产:=FINANCE2(4);
每股收益:=FINANCE2(3);
每股市盈率:=DYNAINFO(39);
销shou毛利率:=FINANCE2(12);
主营收入同比:=FINANCE2(11);
净利润同比增长:=FINANCE2(10);
DRAWTEXTABS(0,50,'基本面情况:'),COLORYELLOW,LINETHICK1;
DRAWTEXTABS(80,50,'每股净资产:'+NUMTOSTRN(每股净资产,2)+'元'),COLORYELLOW,LINETHICK1;
DRAWTEXTABS(210,50,'每股收益:'+NUMTOSTRN(每股收益,2)+'元'),COLORYELLOW,LINETHICK1;
DRAWTEXTABS(365,50,'每股市盈率:'+NUMTOSTRN(每股市盈率,1)+'倍'),COLORYELLOW,LINETHICK1;
DRAWTEXTABS(80,70,'销shou毛利率:'+NUMTOSTRN(销shou毛利率,2)+'%'),COLORYELLOW,LINETHICK1;
DRAWTEXTABS(210,70,'主营收入同比增:'+NUMTOSTRN(主营收入同比,2)+'%'),COLORYELLOW,LINETHICK1;
DRAWTEXTABS(365,70,'净利润同比增:'+NUMTOSTRN(净利润同比增长,2)+'%'),COLORYELLOW,LINETHICK1;
DRAWTEXTABS(0,90,'换手率高低:'),COLORYELLOW,LINETHICK1;
当日换手率:=sum(100*v/capital,1);
DRAWTEXTABS(80,90,'今日换手率: '+NUMTOSTRN(当日换手率,2)+'%'),COLORYELLOW,LINETHICK1;
五日换手率:=sum(100*v/capital,5);
DRAWTEXTABS(210,90,'5日换手率: '+NUMTOSTRN(五日换手率,2)+'%'),COLORYELLOW,LINETHICK1;
十日换手率:=SUM(VOL,10)*100/CAPITAL;
DRAWTEXTABS(365,90,'10日换手率: '+NUMTOSTRN(十日换手率,2)+'%'),COLORYELLOW,LINETHICK1;
DRAWTEXTABS(0,110,'■所属板块:'+' '+BKNAME),COLORYELLOW,LINETHICK1; |