通达信个股决策副图指标 资金流向和智能决策系统 源码 附图

{基本资料}
DRAWTEXT_FIX(1,0.49,0.001,0,'★【自动决策系统】★'),COLORYELLOW;
DRAWTEXT_FIX(1,0.18,0.001,0,' ◆资金决策系统◆ '),COLORWHITE;
DRAWTEXT_FIX(1,0.75,0.001,0,' ◆财务决策系统◆ '),COLORWHITE;
总股本:=STRCAT(STRCAT('总股本: ',CON2STR(TOTALCAPITAL/1000000,2)),'亿。');
流通盘:=STRCAT(STRCAT(' 流通盘: ',CON2STR(CAPITAL/1000000,2)),'亿。');
全流通:=STRCAT(' 全流通: ',CON2STR((CAPITAL/1000000)/(TOTALCAPITAL/1000000),2));
市值:=STRCAT(STRCAT(' 流通市值: ',CON2STR((CAPITAL/1000000)*C,2)),'亿。');
BB1:=STRCAT(STRCAT(STRCAT(总股本,流通盘),全流通),市值);
DRAWTEXT_FIX(ISLASTBAR,0.02,0.11,0,BB1),COLOR0099FF;
{资金流向}
总额:=AMOUNT;
买:=IF(O=C AND (C-REF(C,1))/REF(C,1)*100>9.8,AMOUNT,AMOUNT/((H-L)*2-ABS(O-C))*(C-L));
买%:=买/AMOUNT*100;
流入:=AMOUNT*买%/10000000000;
流出:=AMOUNT/100000000-流入;
净流:=(流入-流出);
总额3:=SUM(AMOUNT,3);
流入3:=SUM(流入,3);
流出3:=SUM(流出,3);
净流3:=SUM(流入-流出,3);
总额5:=SUM(AMOUNT,5);
流入5:=SUM(流入,5);
流出5:=SUM(流出,5);
净流5:=SUM(流入-流出,5);
总额10:=SUM(AMOUNT,10);
流入10:=SUM(流入,10);
流出10:=SUM(流出,10);
净流10:=SUM(流入-流出,10);
总额20:=SUM(AMOUNT,20);
流入20:=SUM(流入,20);
流出20:=SUM(流出,20);
净流20:=SUM(流入-流出,20);
画:=CONST(FINDHIGH(总额20,0,190,1));
DRAWTEXT_FIX(1,0.025,0.21,0,'净流(亿):'),COLOR8080FF,COLORWHITE;
DRAWTEXT_FIX(1,0.075,0.21,0,'1日'),COLOR8080FF,COLORWHITE;
DRAWTEXT_FIX(1,0.155,0.21,0,'3日'),COLOR8080FF,COLORWHITE;
DRAWTEXT_FIX(1,0.235,0.21,0,'5日'),COLOR8080FF,COLORWHITE;
DRAWTEXT_FIX(1,0.315,0.21,0,'10日'),COLOR8080FF,COLORWHITE;
DRAWTEXT_FIX(1,0.395,0.21,0,'20日'),COLOR8080FF,COLORWHITE;
DRAWNUMBER_FIX(1,0.055,0.31,0,CONST((净流))),COLORYELLOW;
DRAWNUMBER_FIX(1,0.150,0.31,0,CONST((净流3))),COLORYELLOW;
DRAWNUMBER_FIX(1,0.230,0.31,0,CONST((净流5))),COLORYELLOW;
DRAWNUMBER_FIX(1,0.310,0.31,0,CONST((净流10))),COLORYELLOW;
DRAWNUMBER_FIX(1,0.390,0.31,0,CONST((净流20))),COLORYELLOW;
{筹码估算}
主力筹码估算:=EMA(WINNER(CLOSE)*70,3),NODRAW,LINETHICK0;
散户筹码估算:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);
散户套牢比率:=散户筹码估算/(主力筹码估算+散户筹码估算)*100;
主力控盘比率:=主力筹码估算/(主力筹码估算+散户筹码估算)*100;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.02,0.59,0,'■ 主筹估算:'),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.07,0.59,0,主力筹码估算),COLORMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.10,0.59,0,' %'),COLORFFCC99;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.17,0.59,0,'■ 控盘比率:'),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.22,0.59,0,主力控盘比率),COLORMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.25,0.59,0,' %'),COLORFFCC99;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.34,0.59,0,'■ 筹码比例 ■'),COLORYELLOW;
{量能决策}
LC:=REF(CLOSE,1);
WRSI:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;
获利筹码:=CONST(WINNER(C)*100);
SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));
量能饱和:=(IF(SAT>1,1,SAT)*100);
WR10:=(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3))*100;
活跃:=(WRSI-WR10);
活跃度比:=IF(活跃>=0,(活跃+100)/2,100-ABS((活跃-100)/2));
DRAWRECTREL(120,430,20,530,RGB(150,10,250));
DRAWRECTREL(260,430,160,530,RGB(150,10,250));
DRAWRECTREL(420,430,320,530,RGB(150,10,250));
DRAWRECTREL(120,430,20+CONST(量能饱和*(120-20)/100),530,RGB(0,100,0));
DRAWTEXT_FIX(1,0.11,0.44,1,STRCAT(STRCAT('量能饱和: ',CON2STR(量能饱和,2)),'%')),COLORYELLOW;
DRAWRECTREL(260,430,160+CONST(活跃度比*(260-160)/100),530,RGB(0,100,0));
DRAWTEXT_FIX(1,0.25,0.44,1,STRCAT(STRCAT('活跃度比: ',CON2STR(活跃度比,2)),'%')),COLORYELLOW;
DRAWRECTREL(420,430,320+CONST(获利筹码*(420-320)/100),530,RGB(0,100,0));
DRAWTEXT_FIX(1,0.41,0.44,1,STRCAT(STRCAT('获利筹码: ',CON2STR(获利筹码,2)),'%')),COLORYELLOW;
{决策提示}
ME2:=EMA(CLOSE,6);
超短线:=EMA(ME2,11),COLORGREEN;
持股:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4,COLORWHITE;
{趋势}
月线:=EMA(持股,30),COLORYELLOW,DOTLINE;
双月线:=EMA(持股,60),COLORCYAN,DOTLINE;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.03,0.69,0,' ◆ 短线提示 ◆ '),COLORYELLOW;
上涨:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND UPNDAY(月线,1) AND UPNDAY(超短线,1) AND UPNDAY(持股,1);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND 上涨,0.04,0.79,0,'上涨趋势'),COLORFF00FF;
短线上涨:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND UPNDAY(月线,1) AND DOWNNDAY(超短线,1) AND UPNDAY(持股,1);
短线上涨0:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND DOWNNDAY(月线,1) AND DOWNNDAY(超短线,1) AND UPNDAY(持股,1);
短线上涨1:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND DOWNNDAY(月线,1) AND UPNDAY(超短线,1) AND UPNDAY(持股,1);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (短线上涨 OR 短线上涨0 OR 短线上涨1),0.04,0.79,0,'短线上涨'),COLOR8080FF;
短线回调:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND UPNDAY(月线,1) AND UPNDAY(超短线,1) AND DOWNNDAY(持股,1);
短线回调0:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND DOWNNDAY(月线,1) AND UPNDAY(超短线,1) AND DOWNNDAY(持股,1);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (短线回调 OR 短线回调0),0.04,0.79,0,'短线回调'),COLORYELLOW;
短线看空:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND UPNDAY(月线,1) AND DOWNNDAY(超短线,1) AND DOWNNDAY(持股,1);
短线看空0:=CURRBARSCOUNT=1 AND UPNDAY(双月线,1) AND DOWNNDAY(月线,1) AND DOWNNDAY(超短线,1) AND DOWNNDAY(持股,1);
短线空仓:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND DOWNNDAY(月线,1) AND DOWNNDAY(超短线,1) AND DOWNNDAY(持股,1);
短线空仓0:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND UPNDAY(月线,1) AND DOWNNDAY(超短线,1) AND DOWNNDAY(持股,1);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (短线空仓 OR 短线空仓0 OR 短线看空 OR 短线看空0),0.04,0.79,0,'短线空仓'),COLORYELLOW;
短线震荡:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND UPNDAY(月线,1) AND UPNDAY(超短线,1) AND DOWNNDAY(持股,1);
短线震荡0:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND UPNDAY(月线,1) AND DOWNNDAY(超短线,1) AND UPNDAY(持股,1);
短线震荡1:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND DOWNNDAY(月线,1) AND UPNDAY(超短线,1) AND DOWNNDAY(持股,1);
注意该股:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND DOWNNDAY(月线,1) AND DOWNNDAY(超短线,1) AND UPNDAY(持股,1);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (短线震荡 OR 短线震荡0 OR 短线震荡1 OR 注意该股),0.04,0.79,0,'短线震荡'),COLORYELLOW;
短线反弹:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND DOWNNDAY(月线,1) AND UPNDAY(超短线,1) AND UPNDAY(持股,1);
短线反弹0:=CURRBARSCOUNT=1 AND DOWNNDAY(双月线,1) AND UPNDAY(月线,1) AND UPNDAY(超短线,1) AND UPNDAY(持股,1);
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND (短线反弹 OR 短线反弹0),0.04,0.79,0,'短线反弹'),COLORYELLOW;

DRAWTEXT_FIX(CURRBARSCOUNT=1 ,0.18,0.69,0,' ◆ 今日决策 ◆ '),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("MACD.MACD">0) AND (CROSS("MACD.DIF","MACD.DEA") OR CROSS(持股,超短线)) AND UPNDAY(超短线,1),0.35,0.89,0,'◆中线重仓◆'),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND ("MACD.MACD"<0) AND (CROSS("MACD.DEA","MACD.DIF") OR CROSS(超短线,持股)) AND DOWNNDAY(超短线,1),0.35,0.89,0,'◆中线空仓◆'),COLORGREEN;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND DOWNNDAY(超短线,1) AND DOWNNDAY(持股,1),0.176,0.79,0,'短线空(减)仓 ◆'),COLORFFFFFF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND DOWNNDAY(超短线,1) AND UPNDAY(持股,1),0.176,0.79,0,'短线买入 30 % ◆'),COLORMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND UPNDAY(超短线,1) AND UPNDAY(持股,1),0.176,0.79,0,'短线买入 60 % ◆'),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND UPNDAY(超短线,1) AND DOWNNDAY(持股,1),0.176,0.79,0,'短线震荡 ◆'),COLORFFFFFF;

均价:=(3*C+H+L+O)/6;
VAR1:=(8*均价+7*REF(均价,1)+6*REF(均价,2)+5*REF(均价,3)+4*REF(均价,4)+3*REF(均价,5)+2*REF(均价,6)+REF(均价,8))/36;
VAR2:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;
SZ1:=REF(VAR1,1)=REF(VAR2,1) AND VAR1>VAR2 AND CLOSE>VAR1;
SZ2:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>REF(VAR2,1) AND H/VAR1<1.1 AND L>VAR2 AND CLOSE>VAR1;
SZ3:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>=REF(VAR2,1) AND H/VAR1>1.1;
SZ4:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>REF(VAR2,1) AND CLOSE>VAR2 AND CLOSE<VAR1;
SZ5:=(VAR1>VAR2 AND VAR2>REF(VAR2,1) AND VAR1<>REF(VAR1,1) AND CLOSE<VAR2) OR (VAR1>VAR2 AND VAR1<REF(VAR1,1) AND VAR2<REF(VAR2,1) AND CLOSE<VAR2);
SZ6:=REF(VAR1,1)>REF(VAR2,1) AND VAR1=VAR2 AND CLOSE<VAR2;
XD1:=VAR1=VAR2 AND CLOSE<VAR2 OR (VAR1<REF(VAR1,1) AND VAR2<REF(VAR2,1) AND REF(VAR1,1)=REF(VAR2,1) AND CLOSE<VAR2);
XD2:=VAR1=VAR2 AND CLOSE>VAR1;
SATT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));
量能饱和度:=IF(SATT>1,1,SATT)*100;
DRAWTEXT_FIX(CURRBARSCOUNT=1 ,0.34,0.69,0,' ◆ 中线提示 ◆ '),COLORYELLOW;
DRAWTEXT_FIX(BARSTATUS=2 AND SZ1,0.33,0.79,0,'调整结束-- 轻仓介入'),COLOR00FFFF;
DRAWTEXT_FIX(BARSTATUS=2 AND SZ2,0.33,0.79,0,'上升通道-- 坐稳持股'),COLOR00FFFF;
DRAWTEXT_FIX(BARSTATUS=2 AND SZ3,0.33,0.79,0,'股价偏离-- 落袋为安'),COLOR00FFFF;
DRAWTEXT_FIX(BARSTATUS=2 AND SZ4,0.33,0.79,0,'上升通道-- 小心洗盘'),COLOR00FFFF;
DRAWTEXT_FIX(BARSTATUS=2 AND SZ5,0.33,0.79,0,'转向特征-- 防守或加仓'),COLORFFFF00;
DRAWTEXT_FIX(BARSTATUS=2 AND SZ6,0.33,0.89,0,'通道改变---离场'),COLORFFFF00;
DRAWTEXT_FIX(BARSTATUS=2 AND XD1,0.33,0.79,0,'下跌通道---观望'),COLORFFFF00;
DRAWTEXT_FIX(BARSTATUS=2 AND XD2,0.33,0.79,0,'短期底部---准备'),COLORFFFF00;

{财务基本面决策}

净资收益率:=(FINANCE(33)/FINANCE(34)*100);
主营利润率:=(FINANCE(23)/FINANCE(20)*100);
现金负债比:=(FINANCE(25)/FINANCE(15));
主营收入同比%:=FINANCE(44);{主营收入同比增长率}
净利润同比%:=FINANCE(43);{净利润同比增长率}
每股收益:=CONST(FINANCE(38));{近期}{每股税后利润}
每股收益年:=CONST(FINANCE(33));
每股净资产:=CONST(FINANCE(34));
每股现金流:=CONST((FINANCE(25)/FINANCE(1)));
每股未分配:=CONST(FINANCE(32));
每股公积金:=CONST(FINANCE(18));
市盈率:=DYNAINFO(39);
市销率:=CONST(FINANCE(1)*DYNAINFO(7)/FINANCE(20));
市净率:=CONST(DYNAINFO(7) / FINANCE(34));
毛利率:=((FINANCE(20)-FINANCE(21))/FINANCE(20)*100);
净利润率:=CONST(FINANCE(30)/FINANCE(20));
销售毛利率:=CONST(((FINANCE(20)-FINANCE(21))/FINANCE(20)*100));
净利润比率:=(FINANCE(30)/FINANCE(20)*100);
优质资产率:=((FINANCE(19)-FINANCE(22)-FINANCE(27))/FINANCE(19));
净利同增率:=FINANCE(43);

每股收益1:=FINANCE(33);
资产报酬率:=FINANCE(29)/FINANCE(10)*100;
股本报酬率:=FINANCE(29)/FINANCE(1)*100;
净值报酬率:=FINANCE(29)/FINANCE(19)*100;
营业纯益率:=FINANCE(29)/FINANCE(20)*100;
主营业务利润率:=FINANCE(21)/FINANCE(20)*100;
负债比率:=(FINANCE(15)+FINANCE(16))/FINANCE(10)*100;
存货周转率:=(FINANCE(20)-FINANCE(23))/FINANCE(27);
固定资产周转率:=FINANCE(20)/FINANCE(12);
市盈率评分:=IF(市盈率<=20 AND 市盈率>0,10,IF(市盈率<=40 AND 市盈率>20,9,IF(市盈率<=60 AND 市盈率>40,8,IF(市盈率<=80 AND 市盈率>60,7,IF(市盈率<=100 AND 市盈率>80,6,IF(市盈率<=130 AND 市盈率>100,5,IF(市盈率<=160 AND 市盈率>130,4,IF(市盈率<=190 AND 市盈率>160,3,IF(市盈率<=220 AND 市盈率>190,2,IF(市盈率<=250 AND 市盈率>220,1,0))))))))));
市净率评分:=IF(市净率>=1,10,IF(市净率<=1 AND 市净率>=0.9,9,IF(市净率<=0.9 AND 市净率>0.8,8,IF(市净率<=0.8 AND 市净率>0.7,7,IF(市净率<=0.7 AND 市净率>0.6,6,IF(市净率<=0.6 AND 市净率>0.5,5,IF(市净率<=0.5 AND 市净率>0.4,4,IF(市净率<=0.4 AND 市净率>0.3,3,IF(市净率<=0.3 AND 市净率>0.2,2,IF(市净率<=0.2 AND 市净率>0,1,0))))))))));
每股收益评分:=IF(每股收益>=2.7,10,IF(每股收益<2.7 AND 每股收益>=2.4,9,IF(每股收益1<2.4 AND 每股收益1>=2.1,8,IF(每股收益1<2.1 AND 每股收益1>=1.8,7,IF(每股收益1<1.8 AND 每股收益1>=1.5,6,IF(每股收益1<1.5 AND 每股收益1>=1.2,5,IF(每股收益1<1.2 AND 每股收益1>=0.9,4,IF(每股收益1<0.9 AND 每股收益1>=0.6,3,IF(每股收益1<0.6 AND 每股收益1>=0.3,2,IF(每股收益1<0.3 AND 每股收益1>=0,1,0))))))))));
资产报酬率评分:=IF(资产报酬率>=27,10,IF(资产报酬率<27 AND 资产报酬率>=24,9,IF(资产报酬率<24 AND 资产报酬率>=21,8,IF(资产报酬率<21 AND 资产报酬率>=18,7,IF(资产报酬率<18 AND 资产报酬率>=15,6,IF(资产报酬率<15 AND 资产报酬率>=12,5,IF(资产报酬率<12 AND 资产报酬率>9,4,IF(资产报酬率<9 AND 资产报酬率>6,3,IF(资产报酬率<6 AND 资产报酬率>=3,2,IF(资产报酬率<3 AND 资产报酬率>0,1,0))))))))));
股本报酬率评分:=IF(股本报酬率>=135,10,IF(股本报酬率<135 AND 股本报酬率>120,9,IF(股本报酬率<120 AND 股本报酬率>=105,8,IF(股本报酬率<105 AND 股本报酬率>90,7,IF(股本报酬率<90 AND 股本报酬率>=75,6,IF(股本报酬率<75 AND 股本报酬率>60,5,IF(股本报酬率<60 AND 股本报酬率>=45,4,IF(股本报酬率<45 AND 股本报酬率>30,3,IF(股本报酬率<30 AND 股本报酬率>=15,2,IF(股本报酬率<15 AND 股本报酬率>0,1,0))))))))));
净值报酬率评分:=IF(净值报酬率>=100,10,IF(净值报酬率<100 AND 净值报酬率>80,9,IF(净值报酬率<80 AND 净值报酬率>=70,8,IF(净值报酬率<70 AND 净值报酬率>60,7,IF(净值报酬率<60 AND 净值报酬率>=50,6,IF(净值报酬率<50 AND 净值报酬率>40,5,IF(净值报酬率<40 AND 净值报酬率>=30,4,IF(净值报酬率<30 AND 净值报酬率>20,3,IF(净值报酬率<20 AND 净值报酬率>=10,2,IF(净值报酬率<10 AND 净值报酬率>=0,1,0))))))))));
营业纯益率评分:=IF(营业纯益率>=60,10,IF(营业纯益率<60 AND 营业纯益率>=50,9,IF(营业纯益率<50 AND 营业纯益率>=40,8,IF(营业纯益率<40 AND 营业纯益率>=30,7,IF(营业纯益率<30 AND 营业纯益率>=20,6,IF(营业纯益率<20 AND 营业纯益率>15,5,IF(营业纯益率<15 AND 营业纯益率>=10,4,IF(营业纯益率<10 AND 营业纯益率>5,3,IF(营业纯益率<5 AND 营业纯益率>=3,2,IF(营业纯益率<3 AND 营业纯益率>=0,1,0))))))))));
主营利润率评分:=IF(主营业务利润率>=60,10,IF(主营业务利润率<60 AND 主营业务利润率>50,9,IF(主营业务利润率<50 AND 主营业务利润率>=45,8,IF(主营业务利润率<45 AND 主营业务利润率>=40,7,IF(主营业务利润率<40 AND 主营业务利润率>=35,6,IF(主营业务利润率<35 AND 主营业务利润率>=30,5,IF(主营业务利润率<30 AND 主营业务利润率>=25,4,IF(主营业务利润率<25 AND 主营业务利润率>=20,3,IF(主营业务利润率<20 AND 主营业务利润率>=10,2,IF(主营业务利润率<10 AND 主营业务利润率>=0,1,0))))))))));
负债比率评分:=IF(负债比率<=0,10,IF(负债比率>0 AND 负债比率<10,9,IF(负债比率>10 AND 负债比率<=20,8,IF(负债比率>20 AND 负债比率<=30,7,IF(负债比率>30 AND 负债比率<=40,6,IF(负债比率>40 AND 负债比率<=50,5,IF(负债比率>50 AND 负债比率<=60,4,IF(负债比率>60 AND 负债比率<=70,3,IF(负债比率>70 AND 负债比率<=80,2,IF(负债比率>80 AND 负债比率<=100,1,0))))))))));
存货周转率评分:=IF(存货周转率>=80,5,IF(存货周转率<80 AND 存货周转率>=60,4,IF(存货周转率<60 AND 存货周转率>=40,3,IF(存货周转率<40 AND 存货周转率>=20,2,IF(存货周转率<20 AND 存货周转率>=0,1,0)))));
资产周转率评分:=IF(固定资产周转率>=20,5,IF(固定资产周转率<20 AND 固定资产周转率>=15,4,IF(固定资产周转率<15 AND 固定资产周转率>=10,3,IF(固定资产周转率<10 AND 固定资产周转率>=5,2,IF(固定资产周转率<5 AND 固定资产周转率>=0,1,0)))));
估值评分:=市盈率评分+市净率评分+每股收益评分;
收益评分:=资产报酬率评分+股本报酬率评分+净值报酬率评分+营业纯益率评分+主营利润率评分;
资产评分:=负债比率评分+存货周转率评分+资产周转率评分,COLORYELLOW,NODRAW;
DRAWTEXT_FIX(ISLASTBAR,0.65,0.110,0,STRCAT('估值评分:',CON2STR(估值评分,3))),COLOR0099FF;
DRAWTEXT_FIX(ISLASTBAR,0.75,0.110,0,STRCAT('收益评分:',CON2STR(收益评分,3))),COLOR0099FF;
DRAWTEXT_FIX(ISLASTBAR,0.85,0.110,0,STRCAT('资产评分:',CON2STR(资产评分,3))),COLOR0099FF;
评分:=估值评分+收益评分+资产评分;
{DRAWTEXT_FIX(ISLASTBAR,0.275,0.365,0,STRCAT('总 评 分:',CON2STR(评分,3))),COLORYELLOW;}
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.65,0.89,0,'总 评 分: 分'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.7,0.89,0,评分),COLORRED;
DRAWTEXT_FIX(ISLASTBAR,0.65,0.49,0,STRCAT('经营状况等级:',IF(评分<40 AND 评分>=30 ,'(合格)',IF(评分<50 AND 评分>=40 ,'(良好)',IF(评分<30 AND 评分>=0 ,'(不合格)',IF(评分>=50,'(优秀)','__')))))),COLOR0099FF;
{DRAWTEXT_FIX(1,0.282,0.535,1,'说明:估值评分没显示表示业绩亏损,资产评分没显示表示为金融类行业。');}

{财务风险系数}
XX1:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;
XX2:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;{盈余公积用资本公积金代替}
XX3:=FINANCE(23)/FINANCE(10)*3.3;
XX4:=FINANCE(19)/FINANCE(15)*0.6;{缺长期负债或负债总额}
XX5:=FINANCE(20)/FINANCE(15)*0.999;
Z值:=XX1+XX2+XX3+XX4+XX5;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.65,0.29,0,'财务预警:'),COLOR0099FF;
DRAWTEXT_FIX(Z值<1.2,0.73,0.29,1,' ●重 警●'),COLORLIRED;
DRAWTEXT_FIX( BETWEEN(Z值,1.2,2.6),0.73,0.29,1,' ○轻 警○'),COLORYELLOW;
DRAWTEXT_FIX(Z值>2.7,0.73,0.29,1,' ◎无 警◎'),COLORLIGREEN;

{-----优秀-------}
ER1:=净资收益率>=13.58;
ER2:=主营利润率>=22.4;
ER5:=净利润比率>=19.42;
SAX1:=每股收益>=0.175;
SAX4:=每股未分配>=2.57;
SAX5:=每股公积金>=3.53;
DP3:=销售毛利率>=49.13;
ZL:=IF((EMA(WINNER(CLOSE)*70,3))>41 AND ISLASTBAR,1,0);
优秀:=ER1 AND ER2 AND ER5 AND SAX1 AND SAX4 AND SAX5 AND DP3 AND ZL;
DRAWTEXT_FIX(优秀 AND ISLASTBAR,0.9,0.29,1,'基本面评估:【优秀】'),COLORRED;
{较好}
ER12:=净资收益率<13.59 AND 净资收益率>6.23;
ER22:=主营利润率>=8.34 AND 主营利润率<22.4;
ER52:=净利润比率>=7.31 AND 净利润比率<19.42;
SAX12:= 每股收益>=0.061 AND 每股收益<0.175;
SAX42:=每股未分配>=1.185 AND 每股未分配<2.57;
SAX52:=每股公积金>1.62 AND 每股公积金<3.53;
DP32:=销售毛利率>=28.68 AND 销售毛利率<49.13;
ZL1:=IF((EMA(WINNER(CLOSE)*70,3))>=11.26 AND ISLASTBAR,1,0);
较好:=ER12 AND ER22 AND ER52 AND SAX12 AND SAX42 AND SAX52 AND DP32 AND ZL1;
DRAWTEXT_FIX(较好 AND ISLASTBAR,0.9,0.29,1,'基本面评估:【较好】'),COLORRED;
{指标偏低}
ER偏低:=净资收益率<=0.27 AND 净资收益率>0;
ER2偏低:=主营利润率<=-1.27;
ER3偏低:=净利润比率<=0.34 AND 净利润比率>0;
SAX偏低:=每股收益<=0.002 AND 每股收益>0;
SAX2偏低:=每股未分配<=0.26 AND 每股未分配>0;
SAX3偏低:=每股公积金<=0.39 AND 每股公积金>0;
DP偏低:=销售毛利率<=4.2 AND 销售毛利率>0;{排名后100}
ZL偏低:=IF(((EMA(WINNER(CLOSE)*70,3))<2.81 AND ISLASTBAR),1,0);
偏低:=IF((ER偏低 OR ER2偏低 OR ER3偏低 OR SAX偏低 OR SAX2偏低 OR SAX3偏低 OR DP偏低 OR ZL偏低) AND ISLASTBAR=1,1,0) ;
DRAWTEXT_FIX( 偏低 AND ISLASTBAR=1 ,0.9,0.29,1,'基本面评估:【有些指数偏低】'),COLORGREEN;
ERC:=净资收益率<0;
ER2C:=主营利润率<-1.27;
ER3C:=净利润比率<0;
SAXC:=每股收益<0;
SAX2C:=每股未分配<0;
SAX3C:=每股公积金<0;
DPC:=销售毛利率<0;{排名后100}
差:=ERC AND ER2C AND ER3C AND SAXC AND SAX2C AND SAX3C AND DPC;
DRAWTEXT_FIX( 差 AND ISLASTBAR=1 ,0.9,0.29,1,'基本面评估:【差】'),COLORGREEN;
{一般};
{一般:=IF((较好!=1 AND 优秀!=1 AND ZL偏低!=1 AND ISLASTBAR=1),1,0);}
一般:=NOT(优秀) AND NOT(较好) AND NOT(偏低) AND NOT(差);
DRAWTEXT_FIX(一般 AND ISLASTBAR=1,0.9,0.29,1,'基本面评估:【一般】'),COLORYELLOW;


净利润增长率:=FINANCE(43);
主营业增长率:=FINANCE(44);


SY01:=净资收益率>3;
SY02:=净资收益率>0.01 AND 净资收益率<=3;
SY03:=主营利润率>2;
SY04:=主营利润率>0;
SY05:=主营业增长率>1;
SY06:=主营业增长率>0;
SY07:=净利润增长率>2;
SY08:=净利润增长率>0.2;
SY09:=每股收益>0.01;
SY10:=每股收益>0.001;
SY11:=每股净资产>2;
SY12:=每股净资产>0.01;
SY13:=每股未分配>0.5;
SY14:=每股未分配>0.001;
SY15:=每股公积金>0.5;
SY16:=每股公积金>0.002;
优良:=SY01 AND SY03 AND SY05 AND SY07 AND SY09 AND SY11 AND SY13 AND SY15 AND DP3 AND ER5;
良好:=SY02 AND SY04 AND SY06 AND SY08 AND SY10 AND SY12 AND SY14 AND SY16 AND DP32 AND ER52;
较差:=NOT(优良) AND NOT(良好);
DRAWTEXT_FIX(优良 AND 良好=0,0.82,0.49,0,'综合评估:★优秀★'),COLORMAGENTA;
DRAWTEXT_FIX(良好,0.82,0.49,0,'综合评估:★较好★'),COLORRED;
DRAWTEXT_FIX(较差,0.82,0.49,0,'综合评估:★较差★'),COLORGREEN;
{高送转潜力}
SY17:=每股未分配>=2 AND 每股公积金>=2;
SY18:=每股未分配<2 OR 每股公积金<2;
DRAWTEXT_FIX(SY17,0.65,0.69,0,'高送转潜力:◆是!◆'),COLORRED;
DRAWTEXT_FIX(SY18,0.65,0.69,0,'高送转潜力:◆否!◆'),COLORGREEN;

DRAWRECTREL(790,650,930,990,RGB(18,18,18));
DRAWTEXT_FIX(1,0.815,0.73,0,'◆财务数据提供日期◆'),COLOR0099FF;
DRAWNUMBER_FIX(1,0.835,0.91,0,MACHINEDATE+19000000),COLORWHITE;

DRAWTEXT_FIX(1,0.825,0.83,0,'第: 季度 ■ '),COLOR0099FF;
DRAWNUMBER_FIX(1,0.845,0.83,0,FINANCE(37)),COLORWHITE;


{显示业绩}

主营同比:=STRCAT(' 主营同比: ',CON2STR(FINANCE(44),2));
每股现金:=STRCAT(' 每股现金: ',CON2STR(FINANCE(25)/FINANCE(1),2));
利润同比:=STRCAT(' 利润同比: ',CON2STR(FINANCE(43),2));
板块涨:=STRCAT(' 板块涨: ',CON2STR(HY_INDEXADV,2));
板块跌:=STRCAT(' 板块跌: ',CON2STR(HY_INDEXDEC,2));
DRAWTEXT_FIX(ISLASTBAR,0.5,0.16,0,每股现金),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0.5,0.32,0,主营同比),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0.5,0.48,0,利润同比),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0.5,0.64,0,板块涨),COLOR3333FF;
DRAWTEXT_FIX(ISLASTBAR,0.5,0.80,0,板块跌),COLOR33CC00;



未来函数检测结果如下:
该公式包含未来函数:WINNER
该公式包含未来函数:CAPITAL
该公式包含未来函数:DYNAINFO
该公式包含未来函数:FINANCE
该公式包含未来函数:DHIGH
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图