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