UPPER:(1+6/100)*MA(CLOSE,25);
LOWER:(1-6/100)*MA(CLOSE,25);
ENE:(UPPER+LOWER)/2;
{压力一}
TY:=C;
A1:=REF(TY,10)=HHV(TY,2*10+1); B1:=FILTER(A1,10); C1:=BACKSET(B1,10+1); HD:=FILTER(C1,10);
A2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(A2,10); C2:=BACKSET(B2,10+1); LD:=FILTER(C2,10);
前期高位:REF(C,BARSLAST(HD)),COLOR00FF00,POINTDOT;
STICKLINE(C,前期高位,前期高位,8,0),COLORYELLOW;
到期:=1;
JLW:=REF(MA(VOL,5),2);
机构异动:=到期 0 AND V REF(V,1)*2 AND C OPEN AND VOL JLW*2 , NODRAW;
机会买入:= 到期 0 AND COUNT(REF(机构异动,1),3) 0 AND 机构异动
DRAWTEXT(机会买入 1 AND 机构异动 0 ,LOW*0.985,'↖异动'),COLORYELLOW;
{未来顶底检测到未来函数:PEAK,TROUGH}
VBB1:=TROUGHBARS(3,15,1)
VBB2:=PEAKBARS(3,15,1)
VBB3:=IF(VBB1=1,50,0);
VBB4:=IF(VBB2=1,50,0);
底部:=IF(VBB3=50,10,0);
头部:=IF(VBB4=50,20,80);
未来底:STICKLINE(IF(底部=10 AND REF(底部,1)=10 AND REF(底部,2)=0,30,0),L*0.985,L*0.99,15,0),LINETHICK2,COLORYELLOW;
未来底买:DRAWTEXT(IF(底部=10 AND REF(底部,1)=10 AND REF(底部,2)=0,1,0),L*0.995,'底'),LINETHICK2,COLORYELLOW;
未来顶:STICKLINE(IF(头部=20 AND REF(头部,1)=20 AND REF(头部,2)=80,30,0),H*1.01,H*1.012,15,0),LINETHICK2,COLORYELLOW;
未来顶卖:DRAWTEXT(IF(头部=20 AND REF(头部,1)=20 AND REF(头部,2)=80,1,0),H*1.02,'顶'),LINETHICK2,COLORYELLOW;
{财务指标}
DRAWTEXT_FIX(1,0.7,0,0,'所属板块:'),COLORFF6000;
DRAWTEXT_FIX(1,0.77,0,0,HYBLOCK),COLORRED;
DRAWTEXT_FIX(1,0.835,0,0,DYBLOCK),COLORYELLOW;
总股本:=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('股本市值: ',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(ISLASTBAR,0.005,0.01,0,财务系数),COLOR888888;
DRAWTEXT_FIX(ISLASTBAR,0.005,0.06,0,当前业绩),COLOR888888;
DRAWTEXT_FIX(ISLASTBAR,0.005,0.115,0,股本市值),COLOR888888;
{红蓝K线}
买:=ZIG(3,6);
卖:=MA(买,2);
DRAWICON(CROSS(买,卖),L-0.1,7);
DRAWICON(CROSS(卖,买),H+0.1,8);
STICKLINE(买 卖 AND O =C,C,O,-1,0),COLORRED;
STICKLINE(买 卖 AND O =C,L,H,0,0),COLORRED;
STICKLINE(买 卖 AND O =C,O,C,-1,1),COLORCYAN;
STICKLINE(买 卖 AND O =C,O,L,0,1),COLORCYAN;
STICKLINE(买 卖 AND O =C,C,H,0,1),COLORCYAN;
VAR11:=MA(C,25),COLORRED;
上升通道:IF(VAR11 REF(VAR11,1),VAR11,DRAWNULL),LINETHICK3,COLORRED;
下降通道:IF(VAR11 REF(VAR11,1),VAR11,DRAWNULL),LINETHICK3,COLORGREEN;