我原来使用Wind F10
由于近段时间不知什么原因已经更新不了啦 所以自己编写
我使用通达信下载港澳F10,然后飞狐调用!
公式一:
F:=F10FIND('【2.股东变化】',1);
F0:=F10FIND(' ',F);
u0:=F10TEXT(F0+440,57);
F1:=F10FIND('截至日期:',F);
u1:=F10TEXT(F1,1);
F2:=F10FIND(' ',F1);
u2:=F10TEXT(F2+111,75);
F3:=F10FIND(' ',F1);
u3:=F10TEXT(F2+187,75);
F4:=F10FIND(' ',F1);
u4:=F10TEXT(F2+265,75);
F5:=F10FIND(' ',F1);
u5:=F10TEXT(F2+340,75);
F6:=F10FIND(' ',F1);
u6:=F10TEXT(F2+491,75);
F7:=F10FIND(' ',F1);
u7:=F10TEXT(F2+567,75);
F8:=F10FIND(' ',F1);
u8:=F10TEXT(F2+643,75);
F9:=F10FIND(' ',F1);
u9:=F10TEXT(F2+719,75);
F10:=F10FIND(' ',F1);
u10:=F10TEXT(F2+795,75);
F11:=F10FIND(' ',F1);
u11:=F10TEXT(F2+871,75);
F12:=F10FIND(' ',F1);
u12:=F10TEXT(F2+947,75);
F13:=F10FIND(' ',F1);
u13:=F10TEXT(F2+1025,75);
F14:=F10FIND(' ',F1);
u14:=F10TEXT(F2+1100,75);
F15:=F10FIND(' ',F1);
u15:=F10TEXT(F2+N4,75);
DRAWTEXTEX(c,0,0,15,u0),COLORYELLOW;
DRAWTEXTEX(c,0,0,15,u1),COLORYELLOW;
DRAWTEXTEX(c,0,0,30,u2),COLORYELLOW;
DRAWTEXTEX(c,0,0,45,u3),COLORYELLOW;
DRAWTEXTEX(c,0,0,60,u4),COLORYELLOW;
DRAWTEXTEX(c,0,0,75,u5),COLORYELLOW;
DRAWTEXTEX(c,0,0,90,u6),COLORYELLOW;
DRAWTEXTEX(c,0,0,105,u7),COLORYELLOW;
DRAWTEXTEX(c,0,0,120,u8),COLORYELLOW;
DRAWTEXTEX(c,0,0,135,u9),COLORYELLOW;
DRAWTEXTEX(c,0,0,150,u10),COLORYELLOW;
DRAWTEXTEX(c,0,0,165,u11),COLORYELLOW;
DRAWTEXTEX(c,0,0,180,u12),COLORYELLOW;
DRAWTEXTEX(c,0,0,195,u13),COLORYELLOW;
DRAWTEXTEX(c,0,0,210,u14),COLORYELLOW;
DRAWTEXTEX(c,0,0,225,u15),COLORYELLOW;
公式二:
查找:=F10FIND('【2.股东户数】',100);股东:=F10FIND('股东户数',查找);
x:=F10FIND('|2009-06-30|',股东);
股东户数x:=STRTONUM(F10TEXT(x+19,10));
户均持股x:=STRTONUM(F10TEXT(x+35,10));
x1:=F10FIND('|2009-03-31|',股东);
股东户数x1:=STRTONUM(F10TEXT(x1+19,10));
户均持股x1:=STRTONUM(F10TEXT(x1+33,10));
x2:=F10FIND('|2008-12-31|',股东);
股东户数x2:=STRTONUM(F10TEXT(x2+19,10));
户均持股x2:=STRTONUM(F10TEXT(x2+33,10));
A3:=SYSPARAM(3);AG:=INTPART((SYSPARAM(3)-SYSPARAM(2))/IF(DATACOUNT>120,40,20));A5:=SYSPARAM(5);
更新:=IF(FINANCE(0)=200909,1,IF(FINANCE(0)=200906,2,IF(FINANCE(0)=200903,3,IF(FINANCE(0)=200812,4,IF(FINANCE(0)=200809,5,0)))));
{柱线}
STICKLINE(BARPOS=A3-AG*3 and 股东户数x>0,0,股东户数x,AG*20,1),ColorF1A8FF;
STICKLINE(BARPOS=A3-AG*2 and 户均持股x>0,0,户均持股x,AG*20,0),ColorF1A8FF;
DRAWTEXT(BARPOS=A3-AG*3,0,'090630'),COLORWHITE,ALIGN5,PXDN5;
STICKLINE(BARPOS=A3-AG*8 and 更新 and 股东户数x1>0,0,股东户数x1,AG*20,1),ColorF1A8FF;
STICKLINE(BARPOS=A3-AG*7 and 更新 and 户均持股x1>0,0,户均持股x1,AG*20,0),ColorF1A8FF;
DRAWTEXT(BARPOS=A3-AG*8,0,'090331'),COLORWHITE,ALIGN5,PXDN5;
STICKLINE(BARPOS=A3-AG*13 and 更新 and 股东户数x2>0,0,股东户数x2,AG*20,1),ColorF1A8FF;
STICKLINE(BARPOS=A3-AG*12 and 更新 and 户均持股x2>0,0,户均持股x2,AG*20,0),ColorF1A8FF;
DRAWTEXT(BARPOS=A3-AG*13,0,'081231'),COLORWHITE,ALIGN5,PXDN5;
公式三:
毛利率(港澳)副图
x1:=F10FIND('【每股指标】',1);
y1:=F10FIND('财务指标(单位)',x1);
n1:=STRTONUM(F10TEXT(y1+20,4));
nn1:=STRTONUM(F10TEXT(y1+25,2));
nn2:=STRTONUM(F10TEXT(y1+28,2));
n2:=STRTONUM(F10TEXT(y1+32,4));
n3:=STRTONUM(F10TEXT(y1+44,4));
n4:=STRTONUM(F10TEXT(y1+56,4));
d1:=F10FIND('【利润构成与盈利能力】',1);
d2:=F10FIND('销shou毛利率(%)',d1);
dd1:=STRTONUM(F10TEXT(d2+20,10));
dd2:=STRTONUM(F10TEXT(d2+32,10));
dd3:=STRTONUM(F10TEXT(d2+44,10));
dd4:=STRTONUM(F10TEXT(d2+56,10));
A3:=SYSPARAM(3);AG:=INTPART((SYSPARAM(3)-SYSPARAM(2))/IF(DATACOUNT>120,40,20));A5:=SYSPARAM(5);
更新:=IF(FINANCE(0)=200909,1,IF(FINANCE(0)=200906,2,IF(FINANCE(0)=200903,3,IF(FINANCE(0)=200812,4,IF(FINANCE(0)=200809,5,0)))));
{柱线}
//增
STICKLINE(BARPOS=A3-AG*3 and 更新 and dd1>0,0,dd1,AG*20,0),ColorF1A8FF;//7
STICKLINE(BARPOS=A3-AG*8 and 更新 and dd2>0,0,dd2,AG*20,1),ColorF1A8FF;//14
STICKLINE(BARPOS=A3-AG*13 and 更新 and dd3>0,0,dd3,AG*20,1),ColorF1A8FF;//21
STICKLINE(BARPOS=A3-AG*18 and 更新 and dd4>0,0,dd4,AG*20,1),ColorF1A8FF;//28
//减
STICKLINE(BARPOS=A3-AG*3 and 更新 and dd1<0,0,dd1,AG*20,0),ColorB9FFBC;
STICKLINE(BARPOS=A3-AG*8 and 更新 and dd2<0,0,dd2,AG*20,1),ColorB9FFBC;
STICKLINE(BARPOS=A3-AG*13 and 更新 and dd3<0,0,dd3,AG*20,1),ColorB9FFBC;
STICKLINE(BARPOS=A3-AG*18 and 更新 and dd4<0,0,dd4,AG*20,1),ColorB9FFBC;
//显示时间
DRAWTEXT(BARPOS=A3-AG*3 and dd1>0,0,NUMTOSTR(n1,0)+'.'+NUMTOSTR(nn1,0)+'.'+NUMTOSTR(nn2,0)),COLORWHITE,ALIGN5,PXDN5;
DRAWTEXT(BARPOS=A3-AG*8 and dd2>0,0,NUMTOSTR(n2,0)),COLORWHITE,ALIGN5,PXDN5;
DRAWTEXT(BARPOS=A3-AG*13 and dd3>0,0,NUMTOSTR(n3,0)),COLORWHITE,ALIGN5,PXDN5;
DRAWTEXT(BARPOS=A3-AG*18 and dd4>0,0,NUMTOSTR(n4,0)),COLORWHITE,ALIGN5,PXDN5;
if(dd1=0,-0.05,0),COLORBLACK;
公式四:
净利润(港澳)副图
x1:=F10FIND('【每股指标】',1);
y1:=F10FIND('财务指标(单位)',x1);
n1:=STRTONUM(F10TEXT(y1+20,4));
nn1:=STRTONUM(F10TEXT(y1+25,2));
nn2:=STRTONUM(F10TEXT(y1+28,2));
n2:=STRTONUM(F10TEXT(y1+32,4));
n3:=STRTONUM(F10TEXT(y1+44,4));
n4:=STRTONUM(F10TEXT(y1+56,4));
d1:=F10FIND('【利润构成与盈利能力】',1);
d2:=F10FIND('净利润(万元)',d1);
dd1:=STRTONUM(F10TEXT(d2+20,10));
dd2:=STRTONUM(F10TEXT(d2+32,10));
dd3:=STRTONUM(F10TEXT(d2+44,10));
dd4:=STRTONUM(F10TEXT(d2+56,10));
A3:=SYSPARAM(3);AG:=INTPART((SYSPARAM(3)-SYSPARAM(2))/IF(DATACOUNT>120,40,20));A5:=SYSPARAM(5);
更新:=IF(FINANCE(0)=200909,1,IF(FINANCE(0)=200906,2,IF(FINANCE(0)=200903,3,IF(FINANCE(0)=200812,4,IF(FINANCE(0)=200809,5,0)))));
{柱线}
//增
STICKLINE(BARPOS=A3-AG*3 and 更新 and dd1>0,0,dd1,AG*20,0),ColorF1A8FF;
STICKLINE(BARPOS=A3-AG*8 and 更新 and dd2>0,0,dd2,AG*20,1),ColorF1A8FF;
STICKLINE(BARPOS=A3-AG*13 and 更新 and dd3>0,0,dd3,AG*20,1),ColorF1A8FF;
STICKLINE(BARPOS=A3-AG*18 and 更新 and dd4>0,0,dd4,AG*20,1),ColorF1A8FF;
//减
STICKLINE(BARPOS=A3-AG*3 and 更新 and dd1<0,0,dd1,AG*20,0),ColorB9FFBC;
STICKLINE(BARPOS=A3-AG*8 and 更新 and dd2<0,0,dd2,AG*20,1),ColorB9FFBC;
STICKLINE(BARPOS=A3-AG*13 and 更新 and dd3<0,0,dd3,AG*20,1),ColorB9FFBC;
STICKLINE(BARPOS=A3-AG*18 and 更新 and dd4<0,0,dd4,AG*20,1),ColorB9FFBC;
//显示时间
DRAWTEXT(BARPOS=A3-AG*3,0,NUMTOSTR(n1,0)+'.'+NUMTOSTR(nn1,0)+'.'+NUMTOSTR(nn2,0)),COLORWHITE,ALIGN5,PXDN5;
DRAWTEXT(BARPOS=A3-AG*8,0,NUMTOSTR(n2,0)+'年'),COLORWHITE,ALIGN5,PXDN5;
DRAWTEXT(BARPOS=A3-AG*13,0,NUMTOSTR(n3,0)+'年'),COLORWHITE,ALIGN5,PXDN5;
DRAWTEXT(BARPOS=A3-AG*18,0,NUMTOSTR(n4,0)+'年'),COLORWHITE,ALIGN5,PXDN5;
-0.02,COLOR99;
公式五:
报表更新(选股)_港澳
首先要保证F10是最新的(请务必及时更新下载通达信F10)
先建立中报(6.30)更新板块
然后根据报表时间自己设定更新(选股)
INPUT:年(2009,1990,2099) ,月(6,1,12) ,日(30,1,31);
t:=f10find('【每股指标】',1);
t1:=f10find('财务指标(单位)',t);
NX:=f10text(t1+20,4);
|