寻星--Wind八步看股评级(飞狐公式) |
|
寻星-- Wind八步看股评级( 飞狐公式) 应网友所求而作,评级项目可选。 CODE: { 寻星-- Wind八步看股评级} INPUT:XM(0,0,8),N(5,1,5);//星的个数 QSW:=F10FIND('【2:八步看股】',100); IF QSW<0 THEN EXIT; ZTW:=F10FIND('整体评级',QSW+30); WZT:=F10FIND(':',ZTW+100); VARIABLE:FXPJ='STR'; FOR i=1 TO 8 DO BEGIN FXPJ:=F10TEXT(WZT-12,24); WZT:=F10FIND(':',WZT+20); END; VarT:=IF(XM=0,F10TEXT(ZTW,20),FXPJ); VarX:=IF(N=5,'★★★★★',IF(N=4,'★★★★',IF(N=3,'★★★',IF(N=2,'★★','★')))); TJ:STRFIND(VarT,VarX,1),LINETHICK; DRAWTEXT(BARPOS=SYSPARAM(2),5,VarT); {参数精灵: 评级项目选择:Param#1(0-8) 0-整体评级 1-优势分析 2-主力分析 3-行业分析 4-估值分析 5-财务分析 6-技术分析 7-回报分析 8-变数分析 评级星在Param#2个以上 适用于多种F10的《持股数》 CODE: {适用于万国、 Wind、鹏搏F10、维赛特F10} INPUT:GD(5,0,10);//柱高度调节 DRAWGBK(v>1,COLORRGB(6,50,242),COLORRGB(200,100,0),1); //F10数据查找 F10:=IF(F10FIND('万国测评制作',1)>0,1,IF(F10FIND(' Wind资讯',1)>0,2,IF(F10FIND('鹏搏资讯',1)>0,3,IF(F10FIND('维赛特财经',1)>0,4,0)))); QSW:=IF(F10=2,F10FIND('【1:主力运作】',100),IF(F10=3,F10FIND('控盘情况:',1),IF(F10=4,F10FIND('(三)历年人均持股情况',1),F10FIND('◆ 控盘情况 ◆',100)))); IF QSW>0 THEN BEGIN WZ1:=F10FIND('-',QSW)-4;WZ2:=F10FIND('-',WZ1+IF(F10=1,10,IF(F10=4,60,20)))-4;WZ3:=F10FIND('-',WZ2+IF(F10=1,10,IF(F10=4,60,20)))-4;WZ4:=F10FIND('-',WZ3+IF(F10=1,10,IF(F10=4,60,20)))-4; WZ5:=IF(F10=2,F10FIND('【2:机构持股】',WZ1),IF(F10=3,F10FIND('公司简况',WZ1),IF(F10=4,F10FIND('(四)QFII持股',WZ1),F10FIND('◆ 概念题材',WZ1))));//查找结束位 //取时间 T1:=F10TEXT(WZ1,10);T2:=IF(WZ2<?XML:NAMESPACE PREFIX = WZ5,F10TEXT(WZ2,10),'');T3 /><WZ5,F10TEXT(WZ2,10),'');T3:=IF(WZ3<WZ5,F10TEXT(WZ3,10),'');T4:=IF(WZ4<WZ5,F10TEXT(WZ4,10),''); </WZ5,F10TEXT(WZ2,10),'');T3:=IF(WZ3<WZ5,F10TEXT(WZ3,10),'');T4:=IF(WZ4<WZ5,F10TEXT(WZ4,10),''); //取股东户数 LS:=IF(F10=1,142,IF(F10=4,29,14));//14; HS1:=STRTONUM(F10TEXT(WZ1+LS,10));HS2:=IF(WZ2<?XML:NAMESPACE PREFIX = WZ5,STRTONUM(F10TEXT(WZ2+LS,10)),0);HS3 /><WZ5,STRTONUM(F10TEXT(WZ2+LS,10)),0);HS3:=IF(WZ3<WZ5,STRTONUM(F10TEXT(WZ3+LS,10)),0);HS4:=IF(WZ4<WZ5,STRTONUM(F10TEXT(WZ4+LS,10)),0); </WZ5,STRTONUM(F10TEXT(WZ2+LS,10)),0);HS3:=IF(WZ3<WZ5,STRTONUM(F10TEXT(WZ3+LS,10)),0);HS4:=IF(WZ4<WZ5,STRTONUM(F10TEXT(WZ4+LS,10)),0); //取户均持股数 LS:=IF(F10=2,28,IF(F10=3,38,IF(F10=4,43,205))); RS1:=STRTONUM(F10TEXT(WZ1+LS,10));RS2:=IF(WZ2<WZ5,STRTONUM(F10TEXT(WZ2+LS,10)),0); RS3:=IF(WZ3<?XML:NAMESPACE PREFIX = WZ5,STRTONUM(F10TEXT(WZ3+LS,10)),0);RS4 /><WZ5,STRTONUM(F10TEXT(WZ3+LS,10)),0);RS4:=IF(WZ4<WZ5,STRTONUM(F10TEXT(WZ4+LS,10)),0); </WZ5,STRTONUM(F10TEXT(WZ3+LS,10)),0);RS4:=IF(WZ4<WZ5,STRTONUM(F10TEXT(WZ4+LS,10)),0); //日期转换 TD1:=STRTONUM('1'+STRMID(T1,3,2)+STRMID(T1,6,2)+STRRIGHT(T1,2)); TD2:=STRTONUM('1'+STRMID(T2,3,2)+STRMID(T2,6,2)+STRRIGHT(T2,2)); TD3:=STRTONUM('1'+STRMID(T3,3,2)+STRMID(T3,6,2)+STRRIGHT(T3,2)); TD4:=STRTONUM('1'+STRMID(T4,3,2)+STRMID(T4,6,2)+STRRIGHT(T4,2)); {将变化持股数对应显示在对应位置} DRAWNUMBER(CROSS(DATE,TD1) AND HS1>100,c,RS1,2),colorFF00FF,ALIGN4; DRAWNUMBER(CROSS(DATE,TD2) AND HS2>100,c,RS2,2),colorFFFF00,ALIGN4; DRAWNUMBER(CROSS(DATE,TD3) AND HS3>100,c,RS3,2),colorFF00,ALIGN4; DRAWNUMBER(CROSS(DATE,TD4) AND HS4>100,c,RS4,2),colorEEFF,ALIGN4; A5:=SYSPARAM(5);A3:=SYSPARAM(3);AG:=INTPART((SYSPARAM(3)-SYSPARAM(2))/8); ZX:=(SYSPARAM(4)-A5),LINETHICK; ZY:=MAX(RS1,MAX(RS2,MAX(RS3,RS4))),LINETHICK; AAA:=ZY/ZX*10/GD,LINETHICK; D:=BACKSET(ISLASTBAR,80); A:=D>REF(D,1); STICKLINE(GD>0 AND BARPOS=A3-AG*1 AND HS1>100,A5,RS1/AAA+A5,AG*3,1),colorFF00FF,LINETHICK2; STICKLINE(GD>0 AND BARPOS=A3-AG*2 AND HS2>100,A5,RS2/AAA+A5,AG*3,1),colorFFFF00,LINETHICK2; STICKLINE(GD>0 AND BARPOS=A3-AG*3 AND HS3>100,A5,RS3/AAA+A5,AG*3,1),colorFF00,LINETHICK2; STICKLINE(GD>0 AND BARPOS=A3-AG*4 AND HS4>100,A5,RS4/AAA+A5,AG*3,1),colorFFCC,LINETHICK2; // END; IF QSW=-1 THEN EXIT; //显示文字 XSW:=SYSPARAM(2)+1=BARPOS; DRAWTEXT(XSW AND HS1>100,A5,'股东户数 \n户均持股 \n 时 间'),COLORFFFF00,PXUP50; DRAWNUMBER(GD>0 AND BARPOS=A3-AG*1 AND HS1>100,SYSPARAM(5),HS1,2),,COLORAFFF00,ALIGN,PXUP50; DRAWNUMBER(GD>0 AND BARPOS=A3-AG*2 AND HS2>100,SYSPARAM(5),HS2,2),,COLORAFFF00,ALIGN,PXUP50; DRAWNUMBER(GD>0 AND BARPOS=A3-AG*3 AND HS3>100,SYSPARAM(5),HS3,2),,COLORAFFF00,ALIGN,PXUP50; DRAWNUMBER(GD>0 AND BARPOS=A3-AG*4 AND HS4>100,SYSPARAM(5),HS4,2),,COLORAFFF00,ALIGN,PXUP50; DRAWNUMBER(GD>0 AND BARPOS=A3-AG*1 AND HS1>100,SYSPARAM(5),RS1,2),,COLORDDDDDD,ALIGN,PXUP30; DRAWNUMBER(GD>0 AND BARPOS=A3-AG*2 AND HS2>100,SYSPARAM(5),RS2,2),,COLORDDDDDD,ALIGN,PXUP30; DRAWNUMBER(GD>0 AND BARPOS=A3-AG*3 AND HS3>100,SYSPARAM(5),RS3,2),,COLORDDDDDD,ALIGN,PXUP30; DRAWNUMBER(GD>0 AND BARPOS=A3-AG*4 AND HS4>100,SYSPARAM(5),RS4,2),,COLORDDDDDD,ALIGN,PXUP30; DRAWTEXT(GD>0 AND BARPOS=A3-AG*1 AND HS1>100,SYSPARAM(5),T1),COLORDD00,ALIGN; DRAWTEXT(GD>0 AND BARPOS=A3-AG*2 AND HS2>100,SYSPARAM(5),T2),COLORDD00,ALIGN; DRAWTEXT(GD>0 AND BARPOS=A3-AG*3 AND HS3>100,SYSPARAM(5),T3),COLORDD00,ALIGN; DRAWTEXT(GD>0 AND BARPOS=A3-AG*4 AND HS4>100,SYSPARAM(5),T4),COLORDD00,ALIGN; // {参数精灵: 柱高度调节Param#1(0-10) http://bbs.macd.cn/attachment.php?aid=992196&noupdate=yes 万国F10的《八面来风》 应网友要求而作。 CODE: {八面来风-万国测评} INPUT:SS(5,1,10); //确定F10种类 F10:=IF(F10FIND('◇万国测评制',1)>0,3,0); DRAWTEXT(SYSPARAM(2)+20=BARPOS AND F10=0,15,'本公式不适合该种F10资料。'),COLOREEFF; IF F10=0 THEN EXIT; ZXW:=F10FIND('◆ 八面来风',10);//开始位 ZXEND:=F10FIND('★★★★★★',ZXW+50);//结束位 NR:=''; KG:=' '; WZT:=ZXW; FOR j=1 TO SS DO BEGIN WZT:=F10FIND('●',WZT+50); IF WZT>ZXEND THEN BREAK; NR:=NR+KG+F10TEXT(WZT,0)+' \n'; WZT:=WZT+100; END; DRAWTEXT(BARPOS=SYSPARAM(2),10,NR),COLORDDFE,ALIGN4; { http://bbs.macd.cn/images/D5/credits_attachlist.gif 附件 2007-2-26 21:46 http://bbs.macd.cn/images/attachicons/image.gif t2.gif (4.4 KB) http://bbs.macd.cn/attachment.php?aid=1042528&noupdate=yes 《 Wind--主力分析评级之 寻星》 调整参数可确定所 寻星的个数。 CODE: { Wind--主力分析评级结果} INPUT:N(5,1,5);//星的个数 ZLW:=F10FIND('主力分析评级结果',100); IF ZLW<0 THEN EXIT; VarT:=F10TEXT(ZLW,0); VarX:=IF(N=5,'★★★★★',IF(N=4,'★★★★',IF(N=3,'★★★',IF(N=2,'★★','★')))); TJ:STRFIND(VarT,VarX,1),LINETHICK; DRAWTEXT(BARPOS=SYSPARAM(2),5,VarT); { 增加了“港澳资讯”的F10公式 先修改了两个,可适用于下列格式的“港澳资讯”F10,另附修改后的“港澳资讯”F10模板文件。 ☆最新提示☆ ◇港澳资讯600833 更新日期:2006-11-15◇ 灵通V4.0 ★本栏包括【1.最新公告】、【2.最新报道】、【3.最新异动】、【4.最新运作】 CODE: {持股数——适用于万国、 Wind、鹏搏、维赛特、港澳资讯F10} INPUT:GD(5,0,10);//柱高度调节 DRAWGBK(v>1,COLORRGB(6,50,242),COLORRGB(200,100,0),1); //F10数据查找 F10:=IF(F10FIND('万国测评制作',1)>0,1,IF(F10FIND(' Wind资讯',1)>0,2,IF(F10FIND('鹏搏资讯',1)>0,3,IF(F10FIND('维赛特',1)>0,4,IF(F10FIND('☆ ◇港澳资讯',1)>0,5,0))))); DRAWTEXT(SYSPARAM(2)+20=BARPOS AND F10=0,15,'本公式不适合该种F10资料。'),COLOREEFF; IF F10=0 THEN EXIT; QSW:=IF(F10=2,F10FIND('【1:主力运作】',100),IF(F10=3,F10FIND('控盘情况:',1),IF(F10=4,F10FIND('(三)历年人均持股情况',1),IF(F10=5,F10FIND('【1.机构持股汇总】 ',1000),F10FIND('◆ 控盘情况 ◆',100))))); QSW:=IF(F10=5,F10FIND('【2.股东户数',QSW),QSW); IF QSW>0 THEN BEGIN WZ1:=F10FIND('-',QSW)-4;WZ2:=F10FIND('-',WZ1+IF(F10=1,10,IF(F10=4,60,20)))-4;WZ3:=F10FIND('-',WZ2+IF(F10=1,10,IF(F10=4,60,20)))-4;WZ4:=F10FIND('-',WZ3+IF(F10=1,10,IF(F10=4,60,20)))-4; WZ5:=IF(F10=2,F10FIND('【2:机构持股】',WZ1),IF(F10=3,F10FIND('公司简况',WZ1),IF(F10=4,F10FIND('(四)QFII持股',WZ1),IF(F10=5,F10FIND('└——',WZ1),F10FIND('◆ 概念题材',WZ1)))));//查找结束位 //取时间 T1:=F10TEXT(WZ1,10);T2:=IF(WZ2<WZ5,F10TEXT(WZ2,10),'');T3:=IF(WZ3<WZ5,F10TEXT(WZ3,10),'');T4:=IF(WZ4<WZ5,F10TEXT(WZ4,10),''); </WZ5,F10TEXT(WZ2,10),'');T3:=IF(WZ3<WZ5,F10TEXT(WZ3,10),'');T4:=IF(WZ4<WZ5,F10TEXT(WZ4,10),''); //取股东户数 LS:=IF(F10=1,142,IF(F10=4,29,IF(F10=5,12,14)));//14; HS1:=STRTONUM(F10TEXT(WZ1+LS,10));HS2:=IF(WZ2<WZ5,STRTONUM(F10TEXT(WZ2+LS,10)),0);HS3:=IF(WZ3<WZ5,STRTONUM(F10TEXT(WZ3+LS,10)),0);HS4:=IF(WZ4<WZ5,STRTONUM(F10TEXT(WZ4+LS,10)),0); </WZ5,STRTONUM(F10TEXT(WZ2+LS,10)),0);HS3:=IF(WZ3<WZ5,STRTONUM(F10TEXT(WZ3+LS,10)),0);HS4:=IF(WZ4<WZ5,STRTONUM(F10TEXT(WZ4+LS,10)),0); //取户均持股数 LS:=IF(F10=2,28,IF(F10=3,38,IF(F10=4,43,IF(F10=5,30,205)))); RS1:=STRTONUM(F10TEXT(WZ1+LS,10));RS2:=IF(WZ2 100,STRTONUM(F10TEXT(WZ2+LS,10)),0); RS3:=IF(WZ3100,STRTONUM(F10TEXT(WZ3+LS,10)),0);RS4:=IF(WZ4100,STRTONUM(F10TEXT(WZ4+LS,10)),0); //日期转换 TD1:=STRTONUM('1'+STRMID(T1,3,2)+STRMID(T1,6,2)+STRRIGHT(T1,2)); TD2:=STRTONUM('1'+STRMID(T2,3,2)+STRMID(T2,6,2)+STRRIGHT(T2,2)); TD3:=STRTONUM('1'+STRMID(T3,3,2)+STRMID(T3,6,2)+STRRIGHT(T3,2)); TD4:=STRTONUM('1'+STRMID(T4,3,2)+STRMID(T4,6,2)+STRRIGHT(T4,2)); {将变化持股数对应显示在对应位置} DRAWNUMBER(CROSS(DATE,TD1) AND HS1>100,c,RS1,2),colorFF00FF,ALIGN4; DRAWNUMBER(CROSS(DATE,TD2) AND HS2>100,c,RS2,2),colorFFFF00,ALIGN4; DRAWNUMBER(CROSS(DATE,TD3) AND HS3>100,c,RS3,2),colorFF00,ALIGN4; DRAWNUMBER(CROSS(DATE,TD4) AND HS4>100,c,RS4,2),colorEEFF,ALIGN4;
A5:=SYSPARAM(5);A3:=SYSPARAM(3);AG:=INTPART((SYSPARAM(3)-SYSPARAM(2))/8); ZY:=MAX(RS1,MAX(RS2,MAX(RS3,RS4))),LINETHICK; ZX:=(SYSPARAM(4)-A5),LINETHICK;//主图 ZX:=(ZY-A5);//副图 AAA:=ZY/ZX*10/GD,LINETHICK; D:=BACKSET(ISLASTBAR,80); A:=D>REF(D,1);
STICKLINE(GD>0 AND BARPOS=A3-AG*1 AND HS1>100,A5,RS1/AAA+A5,AG*3,1),colorFF00FF,LINETHICK2; STICKLINE(GD>0 AND BARPOS=A3-AG*2 AND HS2>100,A5,RS2/AAA+A5,AG*3,1),colorFFFF00,LINETHICK2; STICKLINE(GD>0 AND BARPOS=A3-AG*3 AND HS3>100,A5,RS3/AAA+A5,AG*3,1),colorFF00,LINETHICK2; STICKLINE(GD>0 AND BARPOS=A3-AG*4 AND HS4>100,A5,RS4/AAA+A5,AG*3,1),colorFFCC,LINETHICK2; // END; IF QSW=-1 THEN EXIT; //显示文字 XSW:=SYSPARAM(2)+1=BARPOS; DRAWTEXT(XSW AND HS1>100,A5,'股东户数 \n户均持股 \n 时 间'),COLORFFFF00,PXUP50; DRAWNUMBER(GD>0 AND BARPOS=A3-AG*1 AND HS1>100,SYSPARAM(5),HS1,2),,COLORAFFF00,ALIGN,PXUP50; DRAWNUMBER(GD>0 AND BARPOS=A3-AG*2 AND HS2>100,SYSPARAM(5),HS2,2),,COLORAFFF00,ALIGN,PXUP50; DRAWNUMBER(GD>0 AND BARPOS=A3-AG*3 AND HS3>100,SYSPARAM(5),HS3,2),,COLORAFFF00,ALIGN,PXUP50; DRAWNUMBER(GD>0 AND BARPOS=A3-AG*4 AND HS4>100,SYSPARAM(5),HS4,2),,COLORAFFF00,ALIGN,PXUP50; DRAWNUMBER(GD>0 AND BARPOS=A3-AG*1 AND HS1>100,SYSPARAM(5),RS1,2),,COLORDDDDDD,ALIGN,PXUP30; DRAWNUMBER(GD>0 AND BARPOS=A3-AG*2 AND HS2>100,SYSPARAM(5),RS2,2),,COLORDDDDDD,ALIGN,PXUP30; DRAWNUMBER(GD>0 AND BARPOS=A3-AG*3 AND HS3>100,SYSPARAM(5),RS3,2),,COLORDDDDDD,ALIGN,PXUP30; DRAWNUMBER(GD>0 AND BARPOS=A3-AG*4 AND HS4>100,SYSPARAM(5),RS4,2),,COLORDDDDDD,ALIGN,PXUP30; DRAWTEXT(GD>0 AND BARPOS=A3-AG*1 AND HS1>100,SYSPARAM(5),T1),COLORDD00,ALIGN; DRAWTEXT(GD>0 AND BARPOS=A3-AG*2 AND HS2>100,SYSPARAM(5),T2),COLORDD00,ALIGN; DRAWTEXT(GD>0 AND BARPOS=A3-AG*3 AND HS3>100,SYSPARAM(5),T3),COLORDD00,ALIGN; DRAWTEXT(GD>0 AND BARPOS=A3-AG*4 AND HS4>100,SYSPARAM(5),T4),COLORDD00,ALIGN; // {参数精灵: 柱高度调节Param#1(0-10)
CODE: {机构持股-鹏博、Wind、维赛特、港澳资讯F10} //确定F10种类 F10:=IF(F10FIND('万国测评制作',1)>0,1,IF(F10FIND('Wind资讯',1)>0,2,IF(F10FIND('鹏搏资讯',1)>0,3,IF(F10FIND('维赛特',1)>0,4,IF(F10FIND('☆ ◇港澳资讯',1)>0,5,0))))); DRAWTEXT(SYSPARAM(2)+20=BARPOS AND F10=0,15,'本公式不适合该种F10资料。'),COLOREEFF; IF F10=0 THEN EXIT; //F10数据查找 QSW:=IF(F10=2,F10FIND('股东进出】 <<占流通股比例区',1000),IF(F10=3,F10FIND('【十大流通股东】',500),IF(F10=5,F10FIND('☆股东研究☆',500),F10FIND('【基金机构持股】',1000))));//起 JSW:=IF(F10=2,F10FIND('【2:大股东介绍】',QSW+300),IF(F10=3,F10FIND('【十大股东】',QSW+500),IF(F10=5,F10FIND('【2.基金持股】',QSW+300),F10FIND('<!P关联个股>',QSW+300))));//止
IF QSW<0 THEN EXIT; SJT:=IF(F10=2,F10FIND('流通股东名',QSW+50),IF(F10=5,F10FIND('十大流通股东情况',QSW+50),F10FIND('截止日期',QSW+10))); IF SJT<0 THEN EXIT; { HJW:=F10FIND(IF(F10=2,'总 计',IF(F10=3,'流通A股合计',IF(F10=5,'合计持有','合 计'))),SJT+300); CGT:=LTRIM(IF(F10=4,F10TEXT(HJW+42,36)-'│'-'─',IF(F10=5,F10TEXT(HJW+8,0)-'流通',F10TEXT(HJW+IF(F10=2,20,12),60)))); TTT:=RTRIM(F10TEXT(SJT+IF(F10=2,(-145),IF(F10=3,9,IF(F10=5,(-12),10))),12)); 持股A:=IF(F10=4,STRLEFT(CGT,STRFIND(CGT,' ',3)-1),STRLEFT(CGT,STRFIND(CGT,IF(F10=2,' ',IF(F10=5,'万','(万股')),1)-1)); CGT:=LTRIM(STRRIGHT(CGT-持股A,STRLEN(CGT-持股A)-STRFIND(CGT-持股A,'%',1)-3)); 比例A:STRTONUM(IF(F10=4,STRLEFT(LTRIM(CGT-持股A),STRFIND(LTRIM(CGT-持股A),' ',3)-1),IF(F10=2,STRLEFT(LTRIM(CGT-持股A),STRFIND(LTRIM(CGT-持股A),'%',1)-1), IF(F10=5,STRMID(CGT,STRFIND(CGT,'股',1)+2,STRFIND(CGT,'%',5)),STRMID(CGT,STRFIND(CGT,':',10)+1,STRFIND(CGT,'%',10)-1))))); DRAWTEXT(SYSPARAM(2)+20=BARPOS,15,CGT+NUMTOSTR(比例A,3)); STRFIND(CGT,'万',3); } VARIABLE:TT='STR',持股='STR',比例=0,变化=0; FOR i=1 to 4 DO BEGIN TT:=RTRIM(F10TEXT(SJT+IF(F10=2,(-145),IF(F10=3,9,IF(F10=5,(-12),10))),12));//时间 //RTRIM(F10TEXT(SJT+IF(F10=2,(-145),IF(F10=3,9,10)),12)); HJW:=F10FIND(IF(F10=2,'总 计',IF(F10=3,'流通A股合计',IF(F10=5,'合计持有','合 计'))),SJT+300); //F10FIND(IF(F10=2,'总 计',IF(F10=3,'流通A股合计','合 计')),SJT+300); CGT:=LTRIM(IF(F10=4,F10TEXT(HJW+42,36)-'│'-'─',IF(F10=5,F10TEXT(HJW+8,0)-'流通',F10TEXT(HJW+IF(F10=2,20,12),60)))); //LTRIM(IF(F10=4,F10TEXT(HJW+42,36)-'│'-'─',F10TEXT(HJW+IF(F10=2,20,12),60))); 持股:=IF(F10=4,STRLEFT(CGT,STRFIND(CGT,' ',3)-1),STRLEFT(CGT,STRFIND(CGT,IF(F10=2,' ',IF(F10=5,'万','(万股')),1)-1)); //IF(F10=4,STRLEFT(CGT,STRFIND(CGT,' ',3)-1),STRLEFT(CGT,STRFIND(CGT,IF(F10=2,' ','(万股'),1)-1)); CGT1:=LTRIM(IF(F10=5,STRRIGHT(CGT-持股,STRLEN(CGT-持股)-STRFIND(CGT-持股,'%',1)-3),CGT-持股)); 比例:=STRTONUM(IF(F10=4,STRLEFT(CGT1,STRFIND(CGT1,' ',3)-1),IF(F10=2,STRLEFT(CGT1,STRFIND(CGT1,'%',1)-1), IF(F10=5,STRMID(CGT1,STRFIND(CGT1,'股',1)+2,STRFIND(CGT1,'%',5)),STRMID(CGT,STRFIND(CGT,':',10)+1,STRFIND(CGT,'%',10)-1))))); // 比例:=STRTONUM(IF(F10=4,STRLEFT(LTRIM(CGT-持股),STRFIND(LTRIM(CGT-持股),' ',3)-1), // IF(F10=2,STRLEFT(LTRIM(CGT-持股),STRFIND(LTRIM(CGT-持股),'%',1)-1),STRMID(CGT,STRFIND(CGT,':',10)+1,STRFIND(CGT,'%',10)-1))));
// 变化:=STRTONUM(STRRIGHT(CGT,STRLEN(CGT)-STRFIND(CGT,' ',16)));//维赛特 SJT:=IF(F10=2,F10FIND('流通股东名',HJW+50),IF(F10=5,F10FIND('十大流通股东情况',HJW+50),F10FIND('截止日期',HJW+10))); //IF(F10=2,F10FIND('流通股东名',HJW+50),F10FIND('截止日期',HJW+10)); IF SJT>JSW OR SJT<0 THEN BREAK; END; //DRAWTEXT(SYSPARAM(2)+20=BARPOS,5,TT);
当期:STRTONUM(持股),COLORFF,LINETHICK; 当期(%):比例,PRECISION2,COLORCC,LINETHICK; 上期:STRTONUM(持股),COLORFFFF,LINETHICK; 上期(%):比例,PRECISION2,COLORCCDD,LINETHICK; ±比例:当期(%)-上期(%),PRECISION2,COLORCC00DD,LINETHICK; 前二:STRTONUM(持股),LINETHICK,COLORFFFF00; 前二(%):比例,PRECISION2,COLORCDDD00,LINETHICK; 前三:STRTONUM(持股),COLORFF00,LINETHICK; 前三(%):比例,PRECISION2,COLORAD00,LINETHICK; DRAWTEXT(BARPOS=SYSPARAM(2),10,'“'+IF(F10=4,'机构持股','十大流通股东')+'”最新日期:'+TT),COLOREEEEEE,ALIGN4; //画柱线 A3:=SYSPARAM(3);AG:=INTPART((SYSPARAM(3)-SYSPARAM(2))/IF(DATACOUNT>120,30,20));A5:=SYSPARAM(5); STICKLINE(BARPOS=A3-AG*5 AND 当期>0,0,当期,AG*9,1),colorFF,LINETHICK2; STICKLINE(BARPOS=A3-AG*9 AND 上期>0,0,上期,AG*9,1),colorFFFF,LINETHICK2; STICKLINE(BARPOS=A3-AG*13 AND 前二>0,0,前二,AG*9,1),colorFFFF00,LINETHICK2; STICKLINE(BARPOS=A3-AG*17 AND 前三>0,0,前三,AG*9,1),colorFF00,LINETHICK2; //显示文字 DRAWNUMBER(BARPOS=A3-AG*3 AND 当期>0,A5,当期,2),,COLORFFD000,ALIGN,PXUP80; DRAWNUMBER(BARPOS=A3-AG*7 AND 上期>0,A5,上期,2),,COLORFFD000,ALIGN,PXUP80; DRAWNUMBER(BARPOS=A3-AG*11 AND 前二>0,A5,前二,2),,COLORFFD000,ALIGN,PXUP80; DRAWNUMBER(BARPOS=A3-AG*15 AND 前三>0,A5,前三,2),,COLORFFD000,ALIGN,PXUP80; DRAWNUMBER(BARPOS=A3-AG*3 AND 当期>0,A5,当期(%),2),,COLORDDEE,ALIGN,PXUP55; DRAWNUMBER(BARPOS=A3-AG*7 AND 上期>0,A5,上期(%),2),,COLORDDEE,ALIGN,PXUP55; DRAWNUMBER(BARPOS=A3-AG*11 AND 前二>0,A5,前二(%),2),,COLORDDEE,ALIGN,PXUP55; DRAWNUMBER(BARPOS=A3-AG*15 AND 前三>0,A5,前三(%),2),,COLORDDEE,ALIGN,PXUP55; {维赛特} //DRAWNUMBER(BARPOS=A3-AG*3 AND 当期>0,A5,变化,2),,COLORDD0E,ALIGN,PXUP30; //DRAWNUMBER(BARPOS=A3-AG*7 AND 上期>0,A5,变化,2),,COLORDD0E,ALIGN,PXUP30; //DRAWNUMBER(BARPOS=A3-AG*11 AND 前二>0,A5,变化,2),,COLORDD0E,ALIGN,PXUP30; //DRAWNUMBER(BARPOS=A3-AG*15 AND 前三>0,A5,变化,2),,COLORDD0E,ALIGN,PXUP30; DRAWTEXT(BARPOS=A3-AG*3 AND 当期>0,A5,TT),COLORCCEE90,ALIGN,PXUP2; DRAWTEXT(BARPOS=A3-AG*7 AND 上期>0,A5,TT),COLORCCEE90,ALIGN,PXUP2; DRAWTEXT(BARPOS=A3-AG*11 AND 前二>0,A5,TT),COLORCCEE90,ALIGN,PXUP2; DRAWTEXT(BARPOS=A3-AG*15 AND 前三>0,A5,TT),COLORCCEE90,ALIGN,PXUP2; //-30,COLOR; DRAWTEXT(SYSPARAM(2)+1=BARPOS AND 当期>0,A5,'持股数(万) \n占流通比 \n \n 时 间'),COLORFFFF,PXUP80;//比前期变 //
{筹码分布-“成”“成”内容中的数据提取指标} w:=winner(c)*100; u1:=COST(95); u2:=COST(5); u3:=COST(85); u4:=COST(15); i:=(u1-u2)/(u1+u2)*100;//90%成本集中度 ii:=(u3-u4)/(u3+u4)*100;//70%成本集中度 u5:=(w-ref(w,1))*capital/v/100;//穿透力 u6:=(cost(50));//平均成本 q:=SYSPARAM(1); n:=year; y:=MONTH; r:=DAY; z:=weekday; zi:=z; p:=SYSPARAM(6); wp:=winner(p); iii:=if(zi=1,'一',if(zi=2,'二',if(zi=3,'三',if(zi=4,'四','五')))); tx:=NUMTOSTR(n,0)+'年'+NUMTOSTR(y,0)+'月'+NUMTOSTR(r,0)+'日'+'星期'+iii; EXPLAIN(1,tx); EXPLAIN(1,' \n在光标高度'+NUMTOSTR(p,2)+' 元处的 \n获利盘:'+NUMTOSTR(wp*100,2)+' %'),COLOREEFF; EXPLAIN(1,' \n ***** 目前的 *****\n \n获利筹码='+NUMTOSTR(w,2)+' %\n \n平均成本='+NUMTOSTR(u6,2)+' 元\n \n穿 透 率='+NUMTOSTR(u5,2)),COLORRED; EXPLAIN(1,' \n\n 70%筹码分布在 \n '+NUMTOSTR(u4,2)+'元~'+NUMTOSTR(u3,2)+'元之间'+'\n \n 集中度='+NUMTOSTR(ii,2)),COLOREEA800; EXPLAIN(1,' \n 90%筹码分布在 \n '+NUMTOSTR(u1,2)+'元~'+NUMTOSTR(u2,2)+'元之间'+'\n \n 集中度='+NUMTOSTR(i,2)),COLOREEEE00;
A2:=SYSPARAM(2);A3:=SYSPARAM(3);AG:=INTPART((A3-A2)/8); tx:=NUMTOSTR(n,0)+'年'+NUMTOSTR(y,0)+'月'+NUMTOSTR(r,0)+'日 星期'+iii; DRAWTEXT(barpos=A2+2,h,tx),ALIGN4,COLOREEEEEE; DRAWTEXT(barpos=A2+AG*2,h,' 在光标高度='+NUMTOSTR(p,2)+' 元处,获 利 盘='+NUMTOSTR(wp*100,2)+' %'),ALIGN4,COLOREEFF; DRAWTEXT(barpos=A2+AG*2,h,' \n \n当前的获利筹码='+NUMTOSTR(w,2)+' % ,市场平均成本='+NUMTOSTR(u6,2)+' 元 , 穿透率='+NUMTOSTR(u5,2)),ALIGN4,COLORFF; DRAWTEXT(barpos=A2+AG*1,h,' \n \n \n \n70%筹码分布在'+NUMTOSTR(u4,2)+'元~'+NUMTOSTR(u3,2)+'元之间,集中度='+NUMTOSTR(ii,2) +'; 90%筹码分布在'+NUMTOSTR(u1,2)+'元~'+NUMTOSTR(u2,2)+'元之间,集中度='+NUMTOSTR(i,2)),ALIGN4,COLOREEA800; //DRAWTEXT(barpos=SYSPARAM(2)+2,h,tx),ALIGN4; http://bbs.macd.cn/images/D5/credits_attachlist.gif 附件 2006-12-5 17:32
http://bbs.macd.cn/images/attachicons/image.gif t5.gif (17.94 KB) http://bbs.macd.cn/attachment.php?aid=998428&noupdate=yes
多周期换手
有人所求,记得原来好像发过的。
CODE: INPUT:N(21,10,900); {确定周期参数} BZ:=WEEKDAY;ZB:=DATEDIFF(REF(DATE,1),DATE)<>BZ-REF(BZ,1) OR BARPOS=1;Z1:=SUMBARS(ZB,1);ZZ0:=SUMBARS(ZB,2);//周 BY:=MONTH;YB:=BY-REF(BY,1)<>0 OR BARPOS=1;Y1:=SUMBARS(YB,1);Y0:=SUMBARS(YB,2);//月 BJ:=ROUND(MONTH/3+0.3);JB:=BJ-REF(BJ,1)<>0 OR BARPOS=1;J1:=SUMBARS(JB,1);J0:=SUMBARS(JB,2);//季 BN:=IF(BY<7,1,2);NB:=BN-REF(BN,1)<>0 OR BARPOS=1;N1:=SUMBARS(NB,1);N0:=SUMBARS(NB,2);//半年 年:=YEAR;FN:=年-REF(年,1)<>0 OR BARPOS=1;FN1:=SUMBARS(FN,1);FN0:=SUMBARS(FN,2);//年
//STKTYPE Var1:=STRCMP(MARKETLABEL, 'SH')=0; 流通盘:=STKINDI('','大盘换手率.流通盘',0,6),LINETHICK; 量:=STKINDI(IF(Var1=1,'1A0002','399107'),'HQSJ.量',0,6),LINETHICK; 换手:=IF(STKTYPE>0,VOL/CAPITAL*100,量/流通盘); QB:=IF(STKTYPE>0,SUMBARS(VOL,CAPITAL),SUMBARS(量/100,流通盘)); QB2:=IF(STKTYPE>0,SUMBARS(VOL,CAPITAL*2),SUMBARS(量/100,流通盘*2)),LINETHICK; QB3:=IF(STKTYPE>0,SUMBARS(VOL,CAPITAL*3),SUMBARS(量/100,流通盘*3)),LINETHICK; XX:=BACKSET(BARPOS=SYSPARAM(1),QB)*10;QW:=XX>REF(XX,1) or BARSSINCE(XX)=0; XX2:=BACKSET(BARPOS=SYSPARAM(1),QB2)*20;QW2:=XX2>REF(XX2,1) or BARSSINCE(XX2)=0; XX3:=BACKSET(BARPOS=SYSPARAM(1),QB3)*30;QW3:=XX3>REF(XX3,1) or BARSSINCE(XX3)=0;
当日:换手,STICK; STICKLINE(换手<0.1,0,换手,7,0),COLORBLUE; STICKLINE(换手>=0.1 AND 换手<0.2,0,换手,7,0),COLORYELLOW; STICKLINE(换手>=0.2 AND 换手<1,0,换手,7,0),COLORGREEN; STICKLINE(换手>=1 AND 换手<3,0,换手,7,0),COLORWHITE; STICKLINE(换手>=3 AND 换手<6,0,换手,7,0),COLOR3366FF; STICKLINE(换手>=6 AND 换手<10,0,换手,7,0),COLORMAGENTA; STICKLINE(换手>=10,0,换手,7,0),COLORRED; MA1:MA(换手,N),COLORCCC666; IF DATATYPE<7 THEN 周换:IF(STKTYPE>0,SUM(VOL,Z1)/CAPITAL*100,SUM(量,Z1)/流通盘),COLORYELLOW,PRECISION2,LINETHICK0; IF DATATYPE<8 THEN 月换:IF(STKTYPE>0,SUM(VOL,Y1)/CAPITAL*100,SUM(量,Y1)/流通盘),COLORMAGENTA,PRECISION2,LINETHICK0; IF DATATYPE<9 THEN 季换:IF(STKTYPE>0,SUM(VOL,J1)/CAPITAL*100,SUM(量,J1)/流通盘),COLORGREEN,PRECISION2,LINETHICK0; IF DATATYPE<9 THEN 半年换:IF(STKTYPE>0,SUM(VOL,N1)/CAPITAL*100,SUM(量,N1)/流通盘),COLORRED,PRECISION2,LINETHICK0; 当年换:IF(STKTYPE>0,SUM(VOL,FN1)/CAPITAL*100,SUM(量,FN1)/流通盘),COLORCYAN,PRECISION2,LINETHICK0;
AA2:=SYSPARAM(2);AA3:=SYSPARAM(3);AA0:=AA3-AA2,LINETHICK; STICKLINE(1,0,0,10,0),COLORGREEN;-1,COLORBLACK; DRAWTEXT(AA2=BARPOS,-0.5,'换手率%用彩柱表示:'),COLOR74AFF9; DRAWTEXT(AA2+21=BARPOS,-0.5,'■<0.1;'),COLORBLUE; DRAWTEXT(AA2+30=BARPOS,-0.5,'0.1<■<0.2;'),COLORYELLOW; DRAWTEXT(AA2+43=BARPOS,-0.5,'0.2<■<1;'),COLORGREEN; DRAWTEXT(AA2+54=BARPOS,-0.5,'1<=■<3;'),COLORWHITE; DRAWTEXT(AA2+65=BARPOS,-0.5,'3<=■<6;'),COLOR3366FF; DRAWTEXT(AA2+76=BARPOS,-0.5,'6<=■<10;'),COLORMAGENTA; DRAWTEXT(AA2+87=BARPOS,-0.5,'■>10;'),COLORRED;
VERTLINE(QW),COLOR74AFFF;DRAWTEXT(QW,3,'←100%起点'),COLOR74AFFF,ALIGN4; VERTLINE(QB2<AA0 AND QW2,3,?←200%起点?),COLOREEFF,ALIGN4;<br QW2),COLOREEFF;DRAWTEXT(QB2 VERTLINE(QB3<AA0 AND QW3,3,?←300%起点?),COLORFF,ALIGN4;<br QW3),COLORFF;DRAWTEXT(QB3
两个引用公式请自己建立:
CODE: {大盘换手率} INPUT:HS(14637044,10000000,30000000),SS(8236630,5000000,20000000); Var1:=STRCMP(MARKETLABEL, 'SH')=0; 流通盘:IF(Var1=1,HS,SS),LINETHICK;//《多周期换手》引用 量:=STKINDI(IF(Var1=1,'1A0002','399107'),'HQSJ.量',0,DATATYPE),LINETHICK; 换手率:量/流通盘,LINETHICK; IF STKTYPE>0 THEN 个股:VOL*100/CAPITAL,LINETHICK,COLORFFFF00; 大盘MA:MA(换手率,5),COLORFF; IF STKTYPE>0 THEN 个股MA:MA(个股,5),COLORFF00;
CODE: {HQSJ} CC:CLOSE;HH:HIGH;LL:LOW;OO:OPEN; DD:DATE;D0:ref(DD,1); ZDF:(CC/REF(CC,1)-1)*100; HSH:VOL/IF(CAPITAL>0,CAPITAL,SUM(VOL,120))*100; 前收:REF(CC,1); MA5:MA(CC,5);MA10:MA(CC,10); P:BARPOS,LINETHICK; HLL:WINNER(CLOSE); 量:VOL;额:AMOUNT; LTP:CAPITAL,LINETHICK; HS:DYNAINFO(37); FF:C>MA(C,30); SS:OPENMINUTES(TIME);//分时开盘分钟数 //期货 IF STKTYPE=7 THEN 仓:OPENINT; //
2007-2-26 12:43
10大股东增减
适用于鹏博、Wind、维赛特F10。
CODE: {机构持股-鹏博、Wind、维赛特F10} //确定F10种类 F10:=IF(F10FIND('万国测评制作',1)>0,1,IF(F10FIND('Wind资讯',1)>0,2,IF(F10FIND('鹏搏资讯',1)>0,3,IF(F10FIND('维赛特',1)>0,4,0)))); //F10数据查找 QSW:=IF(F10=2,F10FIND('股东进出】 <<占流通股比例区',1000),IF(F10=3,F10FIND('【十大流通股东】',500),F10FIND('【基金机构持股】',1000)));//起 JSW:=IF(F10=2,F10FIND('【2:大股东介绍】',QSW+300),IF(F10=3,F10FIND('【十大股东】',QSW+500),F10FIND('<!P关联个股>',QSW+300)));//止
IF QSW<0 THEN EXIT;
SJT:=IF(F10=2,F10FIND('流通股东名',QSW+50),F10FIND('截止日期',QSW+10)); IF SJT<0 THEN EXIT; VARIABLE:TT='STR',持股='STR',比例=0,变化=0; FOR i=1 to 4 DO BEGIN TT:=RTRIM(F10TEXT(SJT+IF(F10=2,(-145),IF(F10=3,9,10)),12));//时间 HJW:=F10FIND(IF(F10=2,'总 计',IF(F10=3,'流通A股合计','合 计')),SJT+300); CGT:=LTRIM(IF(F10=4,F10TEXT(HJW+42,36)-'│'-'─',F10TEXT(HJW+IF(F10=2,20,12),60))); 持股:=IF(F10=4,STRLEFT(CGT,STRFIND(CGT,' ',3)-1),STRLEFT(CGT,STRFIND(CGT,IF(F10=2,' ','(万股'),1)-1)); 比例:=STRTONUM(IF(F10=4,STRLEFT(LTRIM(CGT-持股),STRFIND(LTRIM(CGT-持股),' ',3)-1), IF(F10=2,STRLEFT(LTRIM(CGT-持股),STRFIND(LTRIM(CGT-持股),'%',1)-1),STRMID(CGT,STRFIND(CGT,':',10)+1,STRFIND(CGT,'%',10)-1)))); // 变化:=STRTONUM(STRRIGHT(CGT,STRLEN(CGT)-STRFIND(CGT,' ',16)));//维赛特 SJT:=IF(F10=2,F10FIND('流通股东名',HJW+50),F10FIND('截止日期',HJW+10)); IF SJT>JSW OR SJT<0 THEN BREAK; END;
当期:STRTONUM(持股),COLORFF,LINETHICK; 当期(%):比例,PRECISION2,COLORCC,LINETHICK; 上期:STRTONUM(持股),COLORFFFF,LINETHICK; 上期(%):比例,PRECISION2,COLORCCDD,LINETHICK; ±比例:当期(%)-上期(%),PRECISION2,COLORCC00DD,LINETHICK; 前二:STRTONUM(持股),LINETHICK,COLORFFFF00; 前二(%):比例,PRECISION2,COLORCDDD00,LINETHICK; 前三:STRTONUM(持股),COLORFF00,LINETHICK; 前三(%):比例,PRECISION2,COLORAD00,LINETHICK; DRAWTEXT(BARPOS=SYSPARAM(2),10,'“'+IF(F10=4,'机构持股','十大流通股东')+'”最新日期:'+TT),COLOREEEEEE,ALIGN4; //画柱线 A3:=SYSPARAM(3);AG:=INTPART((SYSPARAM(3)-SYSPARAM(2))/IF(DATACOUNT>120,30,20));A5:=SYSPARAM(5); STICKLINE(BARPOS=A3-AG*5 AND 当期>0,0,当期,AG*9,1),colorFF,LINETHICK2; STICKLINE(BARPOS=A3-AG*9 AND 上期>0,0,上期,AG*9,1),colorFFFF,LINETHICK2; STICKLINE(BARPOS=A3-AG*13 AND 前二>0,0,前二,AG*9,1),colorFFFF00,LINETHICK2; STICKLINE(BARPOS=A3-AG*17 AND 前三>0,0,前三,AG*9,1),colorFF00,LINETHICK2; //显示文字 DRAWNUMBER(BARPOS=A3-AG*3 AND 当期>0,A5,当期,2),,COLORFFD000,ALIGN,PXUP80; DRAWNUMBER(BARPOS=A3-AG*7 AND 上期>0,A5,上期,2),,COLORFFD000,ALIGN,PXUP80; DRAWNUMBER(BARPOS=A3-AG*11 AND 前二>0,A5,前二,2),,COLORFFD000,ALIGN,PXUP80; DRAWNUMBER(BARPOS=A3-AG*15 AND 前三>0,A5,前三,2),,COLORFFD000,ALIGN,PXUP80; DRAWNUMBER(BARPOS=A3-AG*3 AND 当期>0,A5,当期(%),2),,COLORDDEE,ALIGN,PXUP55; DRAWNUMBER(BARPOS=A3-AG*7 AND 上期>0,A5,上期(%),2),,COLORDDEE,ALIGN,PXUP55; DRAWNUMBER(BARPOS=A3-AG*11 AND 前二>0,A5,前二(%),2),,COLORDDEE,ALIGN,PXUP55; DRAWNUMBER(BARPOS=A3-AG*15 AND 前三>0,A5,前三(%),2),,COLORDDEE,ALIGN,PXUP55; {维赛特} //DRAWNUMBER(BARPOS=A3-AG*3 AND 当期>0,A5,变化,2),,COLORDD0E,ALIGN,PXUP30; //DRAWNUMBER(BARPOS=A3-AG*7 AND 上期>0,A5,变化,2),,COLORDD0E,ALIGN,PXUP30; //DRAWNUMBER(BARPOS=A3-AG*11 AND 前二>0,A5,变化,2),,COLORDD0E,ALIGN,PXUP30; //DRAWNUMBER(BARPOS=A3-AG*15 AND 前三>0,A5,变化,2),,COLORDD0E,ALIGN,PXUP30; DRAWTEXT(BARPOS=A3-AG*3 AND 当期>0,A5,TT),COLORCCEE90,ALIGN,PXUP2; DRAWTEXT(BARPOS=A3-AG*7 AND 上期>0,A5,TT),COLORCCEE90,ALIGN,PXUP2; DRAWTEXT(BARPOS=A3-AG*11 AND 前二>0,A5,TT),COLORCCEE90,ALIGN,PXUP2; DRAWTEXT(BARPOS=A3-AG*15 AND 前三>0,A5,TT),COLORCCEE90,ALIGN,PXUP2; //-30,COLOR; DRAWTEXT(SYSPARAM(2)+1=BARPOS AND 当期>0,A5,'持股数(万) \n占流通比 \n \n 时 间'),COLORFFFF,PXUP80;//比前期变 //
http://bbs.macd.cn/attachment.php?aid=992519&noupdate=yes > >
| |
|