- 金币:
-
- 奖励:
-
- 热心:
-
- 注册时间:
- 2006-10-26
|
|
谁能帮忙一下把这2个公式合并一下..谢谢
1. raidsan 的 基本面公式
if stktype=1 OR stktype=2 then
BEGIN
{采用 if(numtostr(selfdata('每股收益'),0)='' 这种方法可以判断自定义数据是否为空}
eps1:=if(numtostr(selfdata('每股收益1'),0)='',0,selfdata('每股收益1')); //自定义编辑的, 保守值, 或者是06年值
eps2:=if(numtostr(selfdata('每股收益2'),0)='',0,selfdata('每股收益2')); //自定义编辑的, 大胆值, 或者是07年值
eps3:=if(numtostr(selfdata('每股收益3'),0)='',0,selfdata('每股收益3')); //自定义编辑的, 远景值, 或者是08年值
pe1:=if(eps1=0,0,c/eps1);
pe2:=if(eps2=0,0,c/eps2);
pe3:=if(eps3=0,0,c/eps3);
eps07dzh:=if(numtostr(selfdata('eps2007'),0)='',0,selfdata('eps2007'));
pe07dzh:=if(eps07dzh=0,0,c/eps07dzh);
epsstr:=if(pe1<>0, numtostr(eps1,2), '');
epsstr:=epsstr + if(epsstr<>'' and pe2<>0, '/','') + if(pe2<>0, numtostr(eps2,2), '');
epsstr:=epsstr + if(epsstr<>'' and pe3<>0, '/','') + if(pe3<>0, numtostr(eps3,2), '');
epsstr:=if(pe1=0 and pe2=0 and pe3=0,'', '每股收益='+epsstr) ;
pestr:=if(pe1<>0, numtostr(pe1,1), '');
pestr:=pestr + if(pestr<>'' and pe2<>0, '/', '') + if(pe2<>0, numtostr(pe2,1), '');
pestr:=pestr + if(pestr<>'' and pe3<>0, '/', '') + if(pe3<>0, numtostr(pe3,1), '');
pestr:=if(pe1=0 and pe2=0 and pe3=0,'',', 市盈率='+pestr);
总股本:=FINANCE(1)/10000;
负债率:=100*(FINANCE(15)+FINANCE(16))/FINANCE(10);
流通盘:=CAPITAL/1000000;
净资:=if(FINANCE(35)<>0, FINANCE(35), FINANCE(34)); //有调整每股净值就取调整的, 否则取未调整的
市净率:=c/净资;
dzhstr:=if(pe07dzh=0,'', '\ndzh:07eps='+numtostr(eps07dzh,2)+', 07PE='+numtostr(pe07dzh,2));
value:=FINANCE(1)*C;{总市值}
outstr:= '总股本='+numtostr(总股本,2)+'亿, 流通盘='+numtostr(流通盘,2)+'亿'
+ ',负债率='+numtostr(负债率,2)+ ', 净资='+numtostr(净资,2)+', 市净率='+numtostr(市净率,2)
+ '\n' + epsstr + pestr + dzhstr
+ '\n.\n' + '净利润增长率:\n' + '05Q2/3/4='
+ numtostr(selfdata('净利增率05Q2'),1) + ', '
+ numtostr(selfdata('净利增率05Q3'),1) + ', '
+ numtostr(selfdata('净利增率05Q4'),1) + '\n06Q1/2/3='
+ numtostr(selfdata('净利增率06Q1'),1) + ', '
+ numtostr(selfdata('净利增率06Q2'),1) + ', '
+ numtostr(selfdata('净利增率06Q3'),1)
+ '\n.\n市销比:2006Q1/2/3\n'
+ numtostr(value/(4*selfdata('主营收入06Q1')/10000),2) + ', '
+ numtostr(value/(2*selfdata('主营收入06Q2')/10000),2) + ', '
+ numtostr(value/(4*selfdata('主营收入06Q3')/3/10000),2)
+ '\n.\n毛利率:\n' + '05Q2/3/4='
+ numtostr(selfdata('毛利率05Q2'),1) + ', '
+ numtostr(selfdata('毛利率05Q3'),1) + ', '
+ numtostr(selfdata('毛利率05Q4'),1) + '\n06Q1/2/3='
+ numtostr(selfdata('毛利率06Q1'),1) + ', '
+ numtostr(selfdata('毛利率06Q2'),1) + ', '
+ numtostr(selfdata('毛利率06Q3'),1)
;
outstr:=outstr + if(inblock('沪深300'),'\n\n沪深300','');
DrawText(BARPOS=sysparam(2),sysparam(4),outstr),colorwhite;
end;
2.我们以前用的解盘公式
{五日换手和}
换手率:=VOL/FINANCE(7),VOLSTICK;
换手率和:=SUM(换手率,5);
{解盘}
drawtext(barpos=sysparam(2),h,
' '+blkname{板块}
+'\n 流通 '+NUMTOSTR(FINANCE(7),0)+'万 '{资料}
+'每股收益 '+NUMTOSTR(FINANCE(33),2)+'元 '{资料}
+'净资收益率 '+NUMTOSTR(FINANCE(37),2)+'% '{资料}
+'主营增长 '+NUMTOSTR(FINANCE(53),2)+'% '{资料}
+'利润增长 '+NUMTOSTR(FINANCE(54),0)+'%'{资料}
+'\n 主力持仓 '+NUMTOSTR(SELFDATA('持仓率'),2)+'% '{主力分析}
+'三周增仓 '+NUMTOSTR(SELFDATA('三周增仓'),2)+'% '{主力分析}
+'上周增仓 '+NUMTOSTR(SELFDATA('上周增仓'),2)+'% '{主力分析}
+'基金持仓 '+NUMTOSTR(SELFDATA('持股率'),2)+'% '{主力分析}
+'\n 当天增减 '+NUMTOSTR("主力持仓.当天增减",0)+' '{主力动态}
//+'主力仓量 '+NUMTOSTR("主力持仓.主力仓量",0)+' '
+'获利盘 '+NUMTOSTR(winner(c)*100,0)+'% '
+'五天换手 '+NUMTOSTR(换手率和,0)+'% '{五日换手}
+'\n 三天增减 '+NUMTOSTR("主力持仓.三天增减",0)+' '{主力动态}
+'\n 五天增减 '+NUMTOSTR("主力持仓.五天增减",0)+' '{主力动态}
+'\n 十天增减 '+NUMTOSTR("主力持仓.十天增减",0)+' '{主力动态}
+'\n 廿天增减 '+NUMTOSTR("主力持仓.廿天增减",0)+' '{主力动态}
),ALIGN4,COLORyellow;
谁能合并一下,并把里面一样的信息删减掉..谢谢了 |
|
|