建立指标--名称SJL
IF(FINANCE(34)>=0,C/FINANCE(34),0);
然后再建立指标!
A1:=BLOCKSETNUM('机械行业');
机械行业:=INSUM('机械行业','sjl',1,0)/A1;
DRAWTEXT_FIX(ISLASTBAR,0.01,0.01,0,'机械行业');
DRAWNUMBER_FIX(ISLASTBAR,0.01,0.15,0,机械行业);
A2:=BLOCKSETNUM('电子信息');
电子信息:=INSUM('电子信息','sjl',1,0)/A2;
DRAWTEXT_FIX(ISLASTBAR,0.08,0.01,0,'电子信息');
DRAWNUMBER_FIX(ISLASTBAR,0.08,0.15,0,电子信息);
A3:=BLOCKSETNUM('生物制药');
生物制药:=INSUM('生物制药','sjl',1,0)/A3;
DRAWTEXT_FIX(ISLASTBAR,0.15,0.01,0,'生物制药');
DRAWNUMBER_FIX(ISLASTBAR,0.15,0.15,0,生物制药);
A4:=BLOCKSETNUM('化工行业');
化工行业:=INSUM('化工行业','sjl',1,0)/A4;
DRAWTEXT_FIX(ISLASTBAR,0.23,0.01,0,'化工行业');
DRAWNUMBER_FIX(ISLASTBAR,0.23,0.15,0,化工行业);
A5:=BLOCKSETNUM('房地产');
房地产:=INSUM('房地产','sjl',1,0)/A5;
DRAWTEXT_FIX(ISLASTBAR,0.3,0.01,0,'房地产');
DRAWNUMBER_FIX(ISLASTBAR,0.3,0.15,0,房地产);
A6:=BLOCKSETNUM('电子器件');
电子器件:=INSUM('电子器件','sjl',1,0)/A6;
DRAWTEXT_FIX(ISLASTBAR,0.37,0.01,0,'电子器件');
DRAWNUMBER_FIX(ISLASTBAR,0.37,0.15,0,电子器件);
A7:=BLOCKSETNUM('商业百货');
商业百货:=INSUM('商业百货','sjl',1,0)/A7;
DRAWTEXT_FIX(ISLASTBAR,0.44,0.01,0,'商业百货');
DRAWNUMBER_FIX(ISLASTBAR,0.44,0.15,0,商业百货);
A8:=BLOCKSETNUM('汽车类');
汽车类:=INSUM('汽车类','sjl',1,0)/A8;
DRAWTEXT_FIX(ISLASTBAR,0.51,0.01,0,'汽车类');
DRAWNUMBER_FIX(ISLASTBAR,0.51,0.15,0,汽车类);
A9:=BLOCKSETNUM('交通运输');
交通运输:=INSUM('交通运输','sjl',1,0)/A9;
DRAWTEXT_FIX(ISLASTBAR,0.58,0.01,0,'交通运输');
DRAWNUMBER_FIX(ISLASTBAR,0.58,0.15,0,交通运输);
A10:=BLOCKSETNUM('建筑建材');
建筑建材:=INSUM('建筑建材','sjl',1,0)/A10;
DRAWTEXT_FIX(ISLASTBAR,0.65,0.01,0,'建筑建材');
DRAWNUMBER_FIX(ISLASTBAR,0.65,0.15,0,建筑建材);
A11:=BLOCKSETNUM('有色金属');
有色金属:=INSUM('有色金属','sjl',1,0)/A11;
DRAWTEXT_FIX(ISLASTBAR,0.72,0.01,0,'有色金属');
DRAWNUMBER_FIX(ISLASTBAR,0.72,0.15,0,有色金属);
A12:=BLOCKSETNUM('发电设备');
发电设备:=INSUM('发电设备','sjl',1,0)/A12;
DRAWTEXT_FIX(ISLASTBAR,0.79,0.01,0,'发电设备');
DRAWNUMBER_FIX(ISLASTBAR,0.79,0.15,0,发电设备);
A13:=BLOCKSETNUM('农林牧渔');
农林牧渔:=INSUM('农林牧渔','sjl',1,0)/A13;
DRAWTEXT_FIX(ISLASTBAR,0.86,0.01,0,'农林牧渔');
DRAWNUMBER_FIX(ISLASTBAR,0.86,0.15,0,农林牧渔);
A14:=BLOCKSETNUM('电力行业');
电力行业:=INSUM('电力行业','sjl',1,0)/A14;
DRAWTEXT_FIX(ISLASTBAR,0.01,0.25,0,'电力行业');
DRAWNUMBER_FIX(ISLASTBAR,0.01,0.4,0,电力行业);
A15:=BLOCKSETNUM('钢铁行业');
钢铁行业:=INSUM('钢铁行业','sjl',1,0)/A15;
DRAWTEXT_FIX(ISLASTBAR,0.08,0.25,0,'钢铁行业');
DRAWNUMBER_FIX(ISLASTBAR,0.08,0.4,0,钢铁行业);
A16:=BLOCKSETNUM('食品行业');
食品行业:=INSUM('食品行业','sjl',1,0)/A16;
DRAWTEXT_FIX(ISLASTBAR,0.15,0.25,0,'食品行业');
DRAWNUMBER_FIX(ISLASTBAR,0.15,0.4,0,食品行业);
A17:=BLOCKSETNUM('综合行业');
综合行业:=INSUM('综合行业','sjl',1,0)/A17;
DRAWTEXT_FIX(ISLASTBAR,0.23,0.25,0,'综合行业');
DRAWNUMBER_FIX(ISLASTBAR,0.23,0.4,0,综合行业);
A18:=BLOCKSETNUM('农药化肥');
农药化肥:=INSUM('农药化肥','sjl',1,0)/A18;
DRAWTEXT_FIX(ISLASTBAR,0.30,0.25,0,'农药化肥');
DRAWNUMBER_FIX(ISLASTBAR,0.30,0.4,0,农药化肥);
A19:=BLOCKSETNUM('纺织行业');
纺织行业:=INSUM('纺织行业','sjl',1,0)/A19;
DRAWTEXT_FIX(ISLASTBAR,0.37,0.25,0,'纺织行业');
DRAWNUMBER_FIX(ISLASTBAR,0.37,0.4,0,纺织行业);
A20:=BLOCKSETNUM('服装鞋类');
服装鞋类:=INSUM('服装鞋类','sjl',1,0)/A20;
DRAWTEXT_FIX(ISLASTBAR,0.44,0.25,0,'服装鞋类');
DRAWNUMBER_FIX(ISLASTBAR,0.44,0.4,0,服装鞋类);
A21:=BLOCKSETNUM('金融行业');
金融行业:=INSUM('金融行业','sjl',1,0)/A21;
DRAWTEXT_FIX(ISLASTBAR,0.51,0.25,0,'金融行业');
DRAWNUMBER_FIX(ISLASTBAR,0.51,0.4,0,金融行业);
A22:=BLOCKSETNUM('仪器仪表');
仪器仪表:=INSUM('仪器仪表','sjl',1,0)/A22;
DRAWTEXT_FIX(ISLASTBAR,0.58,0.25,0,'仪器仪表');
DRAWNUMBER_FIX(ISLASTBAR,0.58,0.4,0,仪器仪表);
A23:=BLOCKSETNUM('煤炭行业');
煤炭行业:=INSUM('煤炭行业','sjl',1,0)/A23;
DRAWTEXT_FIX(ISLASTBAR,0.65,0.25,0,'煤炭行业');
DRAWNUMBER_FIX(ISLASTBAR,0.65,0.4,0,煤炭行业);
A24:=BLOCKSETNUM('家电行业');
家电行业:=INSUM('家电行业','sjl',1,0)/A24;
DRAWTEXT_FIX(ISLASTBAR,0.72,0.25,0,'家电行业');
DRAWNUMBER_FIX(ISLASTBAR,0.72,0.4,0,家电行业);
A25:=BLOCKSETNUM('酒店旅游');
酒店旅游:=INSUM('酒店旅游','sjl',1,0)/A25;
DRAWTEXT_FIX(ISLASTBAR,0.79,0.25,0,'酒店旅游');
DRAWNUMBER_FIX(ISLASTBAR,0.79,0.4,0,酒店旅游);
--------------------------------------------
因水准有限50条输出被全部用光了(好像信用咔透支一样)就写到这里吧,论坛不太见到用这2个函数写指标
愿意可能就是因为太咔,不是一般的咔..............
解决方法不清楚!(损招有4如下)
1:删掉不用
2:减少输出提高速度
3:找通大兴去
4:把指标装在你老板或者领导的通大兴里面让他咔的想死!
使用了DRAWTEXT_FIX函数需要---内核是5.692+的版本指标管理器的版本应该在4.15就可以用了!
行业市净率用来判断行业的投资价值使用!
大智慧没装,也不用!飞狐使用中,不会写有高手路过帮我写一个类似的谢谢!
思路来源于千钧茶社5 最新版本的11点闭门贴中的图,图中见到顶底应该使用到了PE之类的东西,而且拿到存货的玩家也需要下F10资料
今天又下班早了顺路通达信写着玩!
|