DRAWGBK(C>0, RGB(50,60,250),RGB(17,21,89),0,'11',0);
O5:='分时引用.O5#DAY';
C5:='分时引用.C5#DAY';
H5:='分时引用.H5#DAY';
L5:='分时引用.L5#DAY';
O4:='分时引用.O4#DAY';
C4:='分时引用.C4#DAY';
H4:='分时引用.H4#DAY';
L4:='分时引用.L4#DAY';
O3:='分时引用.O3#DAY';
C3:='分时引用.C3#DAY';
H3:='分时引用.H3#DAY';
L3:='分时引用.L3#DAY';
O2:='分时引用.O2#DAY';
C2:='分时引用.C2#DAY';
H2:='分时引用.H2#DAY';
L2:='分时引用.L2#DAY';
O1:='分时引用.O1#DAY';
C1:='分时引用.C1#DAY';
H1:='分时引用.H1#DAY';
L1:='分时引用.L1#DAY';
O0:=DYNAINFO(4);
C0:=DYNAINFO(7);
H0:=DYNAINFO(5);
L0:=DYNAINFO(6);
HH1:=MAX(H1,H2);
HH2:=MAX(H3,H4);
HH3:=MAX(MAX(H0,H5),MAX(HH1,HH2));
LL1:=MIN(L1,L2);
LL2:=MIN(L3,L4);
LL3:=MIN(MIN(L0,L5),MIN(LL1,LL2));
HL:=999/(HH3-LL3);
C52:=999-((C5-LL3)*HL);
H52:=999-((H5-LL3)*HL);
L52:=999-((L5-LL3)*HL);
O52:=999-((O5-LL3)*HL);
C42:=999-((C4-LL3)*HL);
H42:=999-((H4-LL3)*HL);
L42:=999-((L4-LL3)*HL);
O42:=999-((O4-LL3)*HL);
C32:=999-((C3-LL3)*HL);
H32:=999-((H3-LL3)*HL);
L32:=999-((L3-LL3)*HL);
O32:=999-((O3-LL3)*HL);
C22:=999-((C2-LL3)*HL);
H22:=999-((H2-LL3)*HL);
L22:=999-((L2-LL3)*HL);
O22:=999-((O2-LL3)*HL);
C12:=999-((C1-LL3)*HL);
H12:=999-((H1-LL3)*HL);
L12:=999-((L1-LL3)*HL);
O12:=999-((O1-LL3)*HL);
C02:=999-((C0-LL3)*HL);
H02:=999-((H0-LL3)*HL);
L02:=999-((L0-LL3)*HL);
O02:=999-((O0-LL3)*HL);
DRAwrECTREL( 8,H52, 8,L52,RGB(IF(C5>=O5,200,0),IF(C5>=O5,0,200),0));
DRAWRECTREL( 0,C52,16,O52,RGB(IF(C5>=O5,128,0),IF(C5>=O5,0,128),0));
DRAWRECTREL(28,H42,28,L42,RGB(IF(C4>=O4,200,0),IF(C4>=O4,0,200),0));
DRAWRECTREL(20,C42,36,O42,RGB(IF(C4>=O4,128,0),IF(C4>=O4,0,128),0));
DRAWRECTREL(48,H32,48,L32,RGB(IF(C3>=O3,200,0),IF(C3>=O3,0,200),0));
DRAWRECTREL(40,C32,56,O32,RGB(IF(C3>=O3,128,0),IF(C3>=O3,0,128),0));
DRAWRECTREL(68,H22,68,L22,RGB(IF(C2>=O2,200,0),IF(C2>=O2,0,200),0));
DRAWRECTREL(60,C22,76,O22,RGB(IF(C2>=O2,128,0),IF(C2>=O2,0,128),0));
DRAWRECTREL(88,H12,88,L12,RGB(IF(C1>=O1,200,0),IF(C1>=O1,0,200),0));
DRAWRECTREL(80,C12,96,O12,RGB(IF(C1>=O1,128,0),IF(C1>=O1,0,128),0));
DRAWRECTREL(108,H02,108,L02,RGB(IF(C0>=O0,200,0),IF(C0>=O0,0,200),0));
DRAWRECTREL(100,C02,116,O02,RGB(IF(C0>=O0,128,0),IF(C0>=O0,0,128),0));
{会心大盘分时主图:}
成交额:=V*C/100,NODRAW;{万元}
A2:=SUM((IF(((成交额/8>20) AND (CLOSE>(REF(CLOSE,1)))),成交额,0)),0);
A3:=SUM((IF(((成交额/8>20) AND (CLOSE<(REF(CLOSE,1)))),成交额,0)),0);
A6:=(A2+A3);
A7:=IF((ISLASTBAR),((100*A2)/A6),0);
A8:=IF((ISLASTBAR),((100*A3)/A6),0);
DD1:=1;
AAA1:=STRCAT(STRCAT('机构买',CON2STR((100*A2)/A6,0)),'%');
AAA2:=STRCAT(STRCAT('机构卖',CON2STR((100*A3)/A6,0)),'%');
AAA3:=STRCAT(STRCAT('机构总买入',CON2STR((100*(A2-A3))/A6,0)),'%');
A000:=DRAWTEXT_FIX(DD1=1,0,0.02,0,AAA1),COLORRED;
A001:=DRAWTEXT_FIX(DD1=1,0,0.13,0,AAA2),COLOR00FF00;
DRAWTEXT_FIX(DD1=1,0,0.24,0,AAA3),COLOR00FFFF;
现手买:=BUYvol*DYNAINFO(7)*100/10000 COLOR0000FF,NODRAW;
现手卖:=SELLVOL*DYNAINFO(7)*100/10000 COLOR00FF00,NODRAW;
合:=Abs(现手买)+ABS(现手卖)COLOR80FFFF,NODRAW;
差:=ABS(现手买)-ABS(现手卖)COLOR80FFFF,NODRAW;
MPB1:=ABS(现手买)/合*100;
MPB2:=ABS(现手卖)/合*100;
TESTSKIP(NOT(现手买 OR 现手卖 OR 合 OR 差 OR MPB1 OR MPB2)!=0);
DRAWRECTREL(640,1000,940,940,RGB(190,190,190));
DRAWRECTREL(640,995,940,945,RGB(200,200,200));
DRAWRECTREL(640,990,940,950,RGB(210,210,210));
DRAWRECTREL(640,985,940,955,RGB(220,220,220));
DRAWRECTREL(640,980,940,960,RGB(230,230,230));
DRAWRECTREL(640,975,940,965,RGB(240,240,240));
DRAWRECTREL(640,970,940,970,RGB(250,250,250));
DRAWRECTREL(790-现手卖*210/合,1000,790,940,RGB(0,128,0));
DRAWRECTREL(790-现手卖*210/合,995,790,945,RGB(0,148,0));
DRAWRECTREL(790-现手卖*210/合,990,790,950,RGB(0,168,0));
DRAWRECTREL(790-现手卖*210/合,985,790,955,RGB(0,188,0));
DRAWRECTREL(790-现手卖*210/合,980,790,960,RGB(0,208,0));
DRAWRECTREL(790-现手卖*210/合,975,790,965,RGB(0,228,0));
DRAWRECTREL(790-现手卖*210/合,970,790,970,RGB(0,248,0));
DRAWRECTREL(790-现手卖*210/合,940,790-现手卖*210/合,1000,RGB(0,128,0));
DRAWRECTREL(790,1000,790+现手买*210/合,940,RGB(128,0,0));
DRAWRECTREL(790,995,790+现手买*210/合,945,RGB(148,0,0));
DRAWRECTREL(790,990,790+现手买*210/合,950,RGB(168,0,0));
DRAWRECTREL(790,985,790+现手买*210/合,955,RGB(188,0,0));
DRAWRECTREL(790,980,790+现手买*210/合,960,RGB(208,0,0));
DRAWRECTREL(790,975,790+现手买*210/合,965,RGB(228,0,0));
DRAWRECTREL(790,970,790+现手买*210/合,970,RGB(248,0,0));
DRAWRECTREL(790+现手买*210/合,940,790+现手买*210/合,1000,RGB(128,0,0));
DRAWRECTREL(789.8,940,790.2,1000,RGB(0,0.0,10));
DRAWRECTREL(639.8,940,640.2,1000,RGB(0,0,10));
DRAWRECTREL(939.8,940,940.2,1000,RGB(0,0,10));
DRAWRECTREL(0,940,1000,940.2,RGB(0,0,10));
DRAWTEXT_FIX(1,0.9,0.88,0,STRCAT(STRCAT('',CON2STR(现手买,1)),'万')),COLOR0000FF;
DRAWTEXT_FIX(1,0.61,0.88,0,STRCAT(STRCAT('',CON2STR(现手卖,1)),'万')),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(差)>0,0.755,0.88,0,STRCAT(' ',STRCAT(CON2STR(差,1),'万'))) COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(差)<0,0.755,0.88,0,STRCAT(' ',STRCAT(CON2STR(差,1),'万'))) COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(差)=0,0.755,0.88,0,STRCAT(' ',STRCAT(CON2STR(差,1),'万'))) COLOR80FFFF;
DRAWTEXT_FIX(1,0.58,0.97,0,STRCAT(STRCAT(' ',CON2STR(MPB2,1)),'%%')),COLOR00FF00;
DRAWTEXT_FIX(1,0.94,0.97,0,STRCAT(STRCAT('',CON2STR(MPB1,1)),'%%')),COLOR0000FF;
{冠军分时主图}
H01:=MAX(DYNAINFO(3),DYNAINFO(5));
L01:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H01-L01;
阻力:L01+P1*7/8,COLORGREEN;
支撑:L01+P1*0.5/8,COLORRED;
中:(支撑+阻力)/2,COLORWHITE,POINTDOT;
现价:CLOSE,COLORWHITE,LINETHICK2;
底买:STICKLINE(C<支撑,支撑,C,5,0),COLORRED;
MR:=C<支撑 AND crOSS(C,REF(C,2));
DRAWTEXT(CROSS(现价,支撑),中,'★买'),COLORRED;
STICKLINE(CROSS(现价,支撑),C,中,2,0),COLORRED;
STICKLINE(MR=1,支撑,中,2,0),COLORRED;
DRAWICON(MR=1 OR CROSS(现价,支撑),中,1);
STICKLINE(CROSS(支撑,现价),支撑,(支撑-中)/5+支撑,2,0),COLORYELLOW;
DRAWTEXT(CROSS(支撑,现价),(支撑-中)/5+支撑,'★底'),COLORYELLOW;
MC:=C>阻力 AND CROSS(REF(C,2),C);
DRAWTEXT(CROSS(阻力,现价),中,'★卖'),COLORGREEN;
STICKLINE(CROSS(阻力,现价),C,中,2,0),COLORGREEN;
STICKLINE(MC=1,阻力,中,2,0),COLORGREEN;
DRAWICON(MC=1 OR CROSS(阻力,现价),中,2);
STICKLINE(CROSS(现价,阻力),阻力,阻力-(支撑-中)/5,2,0),COLORMAGENTA;
DRAWTEXT(CROSS(现价,阻力),阻力-(支撑-中)/5,'★顶'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,阻力,'顶'),COLORGREEN;
DRAWTEXT(ISLASTBAR,支撑,'底'),COLORRED;
DRAWTEXT(ISLASTBAR,(支撑+阻力)/2,'中'),COLORWHITE;
AMOUNT/V/100,COLORYELLOW;
市盈率:=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(' 利润同比: ',CON2STR(FINANCE(43),2));
收入同比:=STRCAT(' 收入同比: ',CON2STR(FINANCE(44),2));
{}
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.14,0.96,0,财务系数),COLORCYAN;
DRAWTEXT_FIX(1,0.14,0.8,0,'所属行业:')COLORCYAN;
DRAWTEXT_FIX(1,0.20,0.8,0,HYBLOCK),COLORWHITE;
DRAWTEXT_FIX(1,0.32,0.8,0,'所属地区:')COLORCYAN;
DRAWTEXT_FIX(1,0.38,0.8,0,DYBLOCK),COLORWHITE;
{开盘三线}
{新版分时主图}
T31:=BArslAST(TIME2=093100);
T40:=BARSLAST(TIME2=094000);
T41:=BARSLAST(TIME2=094100);
T50:=BARSLAST(TIME2=095000);
T51:=BARSLAST(TIME2=095100);
T60:=BARSLAST(TIME2=100000);
C31:=REF(C,T40);
O31:=REF(C,T31);
C40:=REF(C,T50);
O40:=REF(C,T41);
C50:=REF(C,T60);
O50:=REF(C,T51);
A1:=C31>O31 AND C40>O40 AND C50>O50 AND O40>=C31 AND O50>=C40;
A20:=C31<O31 AND C40<O40 AND C50<O50 AND O40<=C31 AND O50<=C40;
A30:=C31>O31 AND C40>O40 AND C50<O50 AND C50<C40 AND O50/C50<C40/O40 AND O50/C50<C31/O31;
A4:=C31>O31 AND C40<O40 AND C50<O50 AND C40<C31 AND C50<C40 AND C31/O31<O40/C40 AND C31/O31<O50/C50;
A5:=C31<O31 AND C40<O40 AND C50>O50 AND C40<C31 AND O50>=C40;
A60:=C31<O31 AND C40>O40 AND C50>O50 AND C40>C31 AND C50>C40 AND O31/C31<C40/O40 AND O31/C31<C50/O50;
A70:=C31>O31 AND C40<O40 AND C50>O50 AND C31/O31>O40/C40 AND C50/O50>O40/C40;
A80:=C31<O31 AND C40>O40 AND C50<O50 AND C40/O40<O31/C31 AND C40/O40<O50/C50;
A9:=MAX(C31,O31)>=MAX(C40,O40) AND MAX(C31,O31)>=MAX(C50,O50);
A10:=MIN(C31,O31)<=MIN(C40,O40) AND MIN(C31,O31)<=MIN(C50,O50);
B1:='连续三上、三阳开泰、飚涨走势可能涨停、量大出货否则守仓、大阳、盯量';
B2:='连续三下、三只乌鸦、重挫走势可能跌停、只要反弹立即出货、大阴、随逃';
B3:='二上一下、二阳一小阴、震荡走势后势看好、逢高减磅逢低吸纳、中阳、阴须小';
B4:='一上二下、二只乌鸦、拉高出货后市看坏、逢高减磅后市下跌、中阴、阳线小';
B5:='二下一上、二阴一阳、急跌控底后市不明、逢高减磅观望为主、下影阴、阳大小';
B6:='一下二上、一阴二阳、震荡控底后市趋好、观望为主谨慎吸纳、下影阳、阴大小';
B7:='一上一下、二阳夹一阴、震荡走市后市看好、持股待涨逢低吸纳、中阳、阴须小再一上';
B8:='一下一上、二阴夹一阳、跌幅较大尾市杀跌、只要反弹立即出货、中阴、阳须小再一下';
B9:='三不创新高、可小阴小阳、三次不过短时顶部、层层阻力离场观望、上影阴阳、小k线';
B10:='三不创新低、可小阴小阳、三次不破短时底部、走势不强逢低少吸、下影阴阳、小K线';
DRAWTEXT_FIX( A1,0.005,0.005,0,B1),COLORRED;
DRAWTEXT_FIX( A20,0.005,0.005,0,B2),COLORGREEN;
DRAWTEXT_FIX( A30,0.005,0.005,0,B3),COLORMAGENTA;
DRAWTEXT_FIX( A4,0.005,0.005,0,B4),COLORCYAN;
DRAWTEXT_FIX( A5,0.005,0.005,0,B5),COLORBROWN;
DRAWTEXT_FIX( A60,0.005,0.005,0,B6),COLORBLUE;
DRAWTEXT_FIX( A70,0.005,0.005,0,B7),COLORYELLOW;
DRAWTEXT_FIX( A80,0.005,0.005,0,B8),COLORLIGREEN;
DRAWTEXT_FIX( A9,0.005,0.05,0,B9),COLORWHITE;
DRAWTEXT_FIX( A10,0.005,0.1,0,B10),COLORLIMAGENTA;