K线界面显示基本面和限售解禁
1、将解禁.txt导入到自定义数据里,名称必须是解禁。该数据是从同花顺官网导出的,可靠
2、将基本面和限售解禁.txt内容复制到均线公式最后
效果如下:解禁最多可显示10行,最上面的是目前流通盘/总股本,下面是解禁日期、解禁量(万股)和解禁量占总股本的比例
公式源码:
{K线显示基本面}
DRAWTEXTABS(0,10,BKNAME),COLORYELLOW;
DRAWTEXTABS(0,25,'流通(亿):'+STR(DYNAINFO(57)/100000000)),COLORYELLOW; DRAWTEXTABS(110,25,'市盈率:'+STR(DYNAINFO(39))),COLORYELLOW; DRAWTEXTABS(210,25,'净产收益率:'+STR(FINANCE2(5))),COLORYELLOW; DRAWTEXTABS(340,25,'报告期:'+STR(FINANCE2(1))),COLORYELLOW;
DRAWTEXTABS(0,40,'每股收益:'+STR(FINANCE2(3))),COLORYELLOW; DRAWTEXTABS(110,40,'净资产:'+STR(FINANCE2(4))),COLORYELLOW; DRAWTEXTABS(210,40,'每股现金流:'+STR(FINANCE2(6))),COLORYELLOW; DRAWTEXTABS(340,40,'净利(亿):'+STR(FINANCE2(33)/10000)),COLORYELLOW;
DRAWTEXTABS(0,55,'每股未分:'+STR(FINANCE2(8))),COLORYELLOW; DRAWTEXTABS(110,55,'公积金:'+STR(FINANCE2(7))),COLORYELLOW; DRAWTEXTABS(210,55,'现金流亿:'+STR(FINANCE2(23)/10000)),COLORYELLOW; DRAWTEXTABS(340,55,'净利同比:'+STR(FINANCE2(10))),COLORYELLOW;
DRAWTEXTABS(0,70,'机构吃货量:'+STR(DYNAINFO(104))),COLORYELLOW; DRAWTEXTABS(110,70,'吐量:'+STR(DYNAINFO(105))),COLORYELLOW; DRAWTEXTABS(210,70,'净量:'+STR(DYNAINFO(104)-DYNAINFO(105))),COLORYELLOW; DRAWTEXTABS(340,70,'未分利亿:'+STR((FINANCE2(34)/10000))),COLORYELLOW;
DRAWTEXTABS(0,85,'机构吃货数:'+STR(DYNAINFO(102))),COLORYELLOW; DRAWTEXTABS(110,85,'吐数:'+STR(DYNAINFO(103))),COLORYELLOW; DRAWTEXTABS(210,85,'净数:'+STR(DYNAINFO(102)-DYNAINFO(103))),COLORYELLOW; DRAWTEXTABS(340,85,'总负债亿:'+STR(FINANCE2(20)/10000)),COLORYELLOW;
{限售解禁}
限售解禁股:=Selfstring('解禁');
XXSJJOffset:= 480;
YXSJJOffset:= 25;
XSJJlineHeight:= 15;
XSJJpos1:= strFIND(限售解禁股, ';', 1);
XSJJpos2:= strFIND(限售解禁股, ';', XSJJpos1 + 1);
XSJJpos3:= strFIND(限售解禁股, ';', XSJJpos2 + 1);
XSJJpos4:= strFIND(限售解禁股, ';', XSJJpos3 + 1);
XSJJpos5:= strFIND(限售解禁股, ';', XSJJpos4 + 1);
XSJJpos6:= strFIND(限售解禁股, ';', XSJJpos5 + 1);
XSJJpos7:= strFIND(限售解禁股, ';', XSJJpos6 + 1);
XSJJpos8:= strFIND(限售解禁股, ';', XSJJpos7 + 1);
XSJJpos9:= strFIND(限售解禁股, ';', XSJJpos8 + 1);
XSJJpos10:= strFIND(限售解禁股, ';', XSJJpos9 + 1);
XSJJstr1:= strMID(限售解禁股, 1 , XSJJpos1-1);
XSJJstr2:= strMID(限售解禁股, XSJJpos1 + 1, XSJJpos2 - XSJJpos1 - 1);
XSJJstr3:= strMID(限售解禁股, XSJJpos2 + 1, XSJJpos3 - XSJJpos2 - 1);
XSJJstr4:= strMID(限售解禁股, XSJJpos3 + 1, XSJJpos4 - XSJJpos3 - 1);
XSJJstr5:= strMID(限售解禁股, XSJJpos4 + 1, XSJJpos5 - XSJJpos4 - 1);
XSJJstr6:= strMID(限售解禁股, XSJJpos5 + 1, XSJJpos6 - XSJJpos5 - 1);
XSJJstr7:= strMID(限售解禁股, XSJJpos6 + 1, XSJJpos7 - XSJJpos6 - 1);
XSJJstr8:= strMID(限售解禁股, XSJJpos7 + 1, XSJJpos8 - XSJJpos7 - 1);
XSJJstr9:= strMID(限售解禁股, XSJJpos8 + 1, XSJJpos9 - XSJJpos8 - 1);
XSJJstr10:= strMID(限售解禁股, XSJJpos9 + 1, XSJJpos10 - XSJJpos9 - 1);
DRAWTEXTABS(XXSJJOffset, YXSJJOffset, '目前流通率:'+STR(DYNAINFO(57)/DYNAINFO(56)*100)+'%'), ColorYELLOW;
IF XSJJpos1 THEN DRAWTEXTABS(XXSJJOffset, YXSJJOffset + XSJJlineHeight, XSJJstr1), ColorYELLOW;
IF XSJJpos1 AND XSJJpos2 THEN DRAWTEXTABS(XXSJJOffset, YXSJJOffset + XSJJlineHeight*2, XSJJstr2), ColorYELLOW;
IF XSJJpos1 AND XSJJpos2 AND XSJJpos3 THEN DRAWTEXTABS(XXSJJOffset, YXSJJOffset + XSJJlineHeight*3, XSJJstr3), ColorYELLOW;
IF XSJJpos1 AND XSJJpos2 AND XSJJpos3 AND XSJJpos4 THEN DRAWTEXTABS(XXSJJOffset, YXSJJOffset + XSJJlineHeight*4, XSJJstr4), ColorYELLOW;
IF XSJJpos1 AND XSJJpos2 AND XSJJpos3 AND XSJJpos4 AND XSJJpos5 THEN DRAWTEXTABS(XXSJJOffset, YXSJJOffset + XSJJlineHeight*5, XSJJstr5), ColorYELLOW;
IF XSJJpos1 AND XSJJpos2 AND XSJJpos3 AND XSJJpos4 AND XSJJpos5 AND XSJJpos6 THEN DRAWTEXTABS(XXSJJOffset, YXSJJOffset + XSJJlineHeight*6, XSJJstr6), ColorYELLOW;
IF XSJJpos1 AND XSJJpos2 AND XSJJpos3 AND XSJJpos4 AND XSJJpos5 AND XSJJpos6 AND XSJJpos7 THEN DRAWTEXTABS(XXSJJOffset, YXSJJOffset + XSJJlineHeight*7, XSJJstr7), ColorYELLOW;
IF XSJJpos1 AND XSJJpos2 AND XSJJpos3 AND XSJJpos4 AND XSJJpos5 AND XSJJpos6 AND XSJJpos7 AND XSJJpos8 THEN DRAWTEXTABS(XXSJJOffset, YXSJJOffset + XSJJlineHeight*8, XSJJstr8), ColorYELLOW;
IF XSJJpos1 AND XSJJpos2 AND XSJJpos3 AND XSJJpos4 AND XSJJpos5 AND XSJJpos6 AND XSJJpos7 AND XSJJpos8 AND XSJJpos9 THEN DRAWTEXTABS(XXSJJOffset, YXSJJOffset + XSJJlineHeight*9, XSJJstr9), ColorYELLOW;
IF XSJJpos1 AND XSJJpos2 AND XSJJpos3 AND XSJJpos4 AND XSJJpos5 AND XSJJpos6 AND XSJJpos7 AND XSJJpos8 AND XSJJpos9 AND XSJJpos10 THEN DRAWTEXTABS(XXSJJOffset, YXSJJOffset + XSJJlineHeight*10, XSJJstr10), ColorYELLOW;