N:=(H+L+C)/3;
明1压:2*N-L,LINETHICK0,NODRAW;
明1支:2*N-H,LINETHICK0,NODRAW;
明2压:N+H-L,LINETHICK0,NODRAW;
明2支:N-H+L,LINETHICK0,NODRAW;
{乖离}
BIAS1:=(C-MA(C,6))/MA(C,6)*100;
BIAS2:=(C-MA(C,12))/MA(C,12)*100;
BIAS3:=(C-MA(C,24))/MA(C,24)*100;
BIAS:=(BIAS1+2*BIAS2+3*BIAS3)/6;
乖离:=MA(BIAS,3);
DRAWTEXT(CROSS(BIAS,乖离) AND 乖离<-9.5,L*0.95,'↖红柱抄底'),COLORRED;
{KD}
K:=(C+H+L)/3; D:=MA(K,4);
DRAWTEXT(REF(C,1)>D AND C<D AND D>REF(D,1),H*1.02,'←卖'),COLORYELLOW;
DRAWTEXT(REF(C,1)<D AND C>D AND D<REF(D,1) AND C>REF(C,1)*1.045,L*0.98, '←买'),COLORMAGENTA;
HH:=CONST(HHV(H,160));
LL:=CONST(LLV(L,160));{160可改成你习惯锁定的日K线数}
HL1:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.76,0.04));
HL2:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.80,0.08));
HL3:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.84,0.12));
HL4:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.88,0.16));
HL5:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.92,0.20));
HL6:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.96,0.24));
DRAWTEXT_FIX(1,0.00,0,0,'所属行业:')COLOR0080FF;
DRAWTEXT_FIX(1,0.07,0,0,HYBLOCK)COLOR0080FF;
DRAWTEXT_FIX(1,0.14,0,0,'所属地区:')COLOR00FFFF;
DRAWTEXT_FIX(1,0.21,0,0,DYBLOCK)COLOR00FFFF;
DRAWTEXT_FIX(1,0.00,0.06,0,'主题投资:')COLOR0000FF;
DRAWTEXT_FIX(1,0.07,0.06,0,EXTERNSTR(0,1))COLOR0000FF;
DRAWTEXT_FIX(1,0.00,0.12,0,'财务分折:')COLORMAGENTA;
DRAWTEXT_FIX(1,0.07,0.06,0,EXTERNSTR(0,1))COLOR0000FF;
{股本市值}
总股本:=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)),'亿');
上市天数:=STRCAT(' 上市天数: ',CON2STR(FINANCE(42),0));
{上市日期:=STRCAT(' 上市日期: ',CON2STR(HHV((BARSCOUNT(C)=0)*(DATE+19000000),0),0));}
股本市值:=STRCAT('股本市值: ',STRCAT(STRCAT(STRCAT(STRCAT(总股本,流通盘),全流通),市值),上市天数));
{业绩综合}
市盈率:=STRCAT('市盈率: ',CON2STR(C/FINANCE(33),2));
市销率:=STRCAT(' 市销率: ',CON2STR(C/(FINANCE(20)/FINANCE(1)),2));
市净率:=STRCAT(' 市净率: ',CON2STR(C/FINANCE(34),2));
净资收益率:=STRCAT(' 净资收益率: ',CON2STR(FINANCE(33)/FINANCE(34)*100,2));
毛利率:=STRCAT(' 毛利率: ',CON2STR((FINANCE(20)-FINANCE(21))/FINANCE(20)*100,2));
净利润率:=STRCAT(' 净利润率 ',CON2STR(FINANCE(30)/FINANCE(20)*100,2));
主营利润率:=STRCAT(' 主营利润率 ',CON2STR(FINANCE(23)/FINANCE(20)*100,2));
当前业绩:=STRCAT('当前业绩: ',STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(市盈率,市销率),市净率),净资收益率),毛利率),净利润率),主营利润率));
{风险系数}
X1:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;
X2:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;{盈余公积用资本公积金代替};
X3:=FINANCE(23)/FINANCE(10)*3.3;
X4:=FINANCE(19)/FINANCE(15)*0.6;{缺长期负债或负债总额}
X5:=FINANCE(20)/FINANCE(15)*0.999;
Z值:=X1+X2+X3+X4+X5;
预警:=IF(Z值<1.2,'重警',IF(Z值>=1.2 AND Z值<2.6,'轻警','无警'));
财务预警:=STRCAT('财务预警: ',STRCAT(预警,STRCAT('-Z值: ',CON2STR(Z值,3))));
优质资产率:=STRCAT(' 优质资产率: ',CON2STR((FINANCE(19)-FINANCE(22)-FINANCE(27))/FINANCE(19),2));{理论上越大越好但不同行业有不同标准};
现金负债比:=STRCAT(' 现金负债比: ',CON2STR(FINANCE(25)/FINANCE(15),3));{缺长期负债或负债总额,理论上越大越好但不同行业有不同标准};
财务系数:=STRCAT('风险系数: ',STRCAT(STRCAT(财务预警,优质资产率),现金负债比));
{财务分折}
DRAWTEXT_FIX (1,0.05,0.12,0,'现金流:'),COLOR00CCCC;
DRAWNUMBER_FIX(1,0.086,0.12,0,CONST(FINANCE(25)/1000000000)),COLOR00CCCC;
DRAWTEXT_FIX (1,0.125,0.12,0,'应收款:'),COLOR00CCCC;
DRAWNUMBER_FIX(1,0.159,0.12,0,CONST(FINANCE(22)/100000000)),COLOR00CCCC;
DRAWTEXT_FIX (1,0.193,0.12,0,'存货:'),COLOR00CCCC;
DRAWNUMBER_FIX(1,0.218,0.12,0,CONST(FINANCE(27)/100000000)),COLOR00CCCC;
DRAWTEXT_FIX(1,0.253,0.12,0,'流动比率:'),COLOR00CCCC;{流动比率值>1.5<2.5较为合理,低于1说明偿债能力欠佳。}
DRAWNUMBER_FIX(1,0.299,0.12,0,CONST(FINANCE(11)/FINANCE(15))),COLOR00CCCC;
DRAWTEXT_FIX(1,0.336,0.12,0,'速动比率:'),COLOR00CCCC;
DRAWNUMBER_FIX(1,0.383,0.12,0,CONST(FINANCE(11)-FINANCE(27)/FINANCE(15))),COLOR00CCCC;
DRAWTEXT_FIX (1,0.47,0.12,0,'套牢盘%:'),COLOR00CCCC;
DRAWNUMBER_FIX(1,0.507,0.12,0,CONST(100-WINNER(CLOSE)*100)),COLOR00CCCC;
DRAWTEXT_FIX (1,0.348,0.30,0,'流动债:'),COLORGREEN;
DRAWNUMBER_FIX(1,0.385,0.30,0,CONST(FINANCE(15)/100000000)),COLORGREEN;
DRAWTEXT_FIX (1,0.426,0.30,0,'长期债:'),COLORGREEN;
DRAWNUMBER_FIX(1,0.463,0.30,0,CONST(FINANCE(16)/100000000)),COLORGREEN;
{www.fxjgsw.com}
DRAWTEXT_FIX(ISLASTBAR,0.00,0.18,0,股本市值),COLORGREEN;
DRAWTEXT_FIX(ISLASTBAR,0.00,0.24,0,当前业绩),COLORGREEN;
DRAWTEXT_FIX(ISLASTBAR,0.00,0.30,0,财务系数),COLORGREEN; |