{所属板块、概念}

DRAWTEXT_FIX(1,0.0,0.0.5,0,HYBLOCK),COLORYELLOW;

M5:=MA(CLOSE,5);

M13:=MA(CLOSE,13);

M21:=MA(CLOSE,21);

{所属板块、概念}

{流通盘}

YSTB:=STRCAT(CON2STR(FINANCE(44)/1,2),'%');

LRTB:=STRCAT(CON2STR(FINANCE(43)/1,2),'%');

净资收益率:=(FINANCE(33)/FINANCE(34)*100);

主营利润率:=(FINANCE(23)/FINANCE(20)*100);

主营业增长率:=FINANCE(44);

每股净资产:=CONST(FINANCE(34));

每股收益:=CONST(FINANCE(38));

净利润增长率:=FINANCE(43);

市销率:=CONST(FINANCE(1)*DYNAINFO(7)/FINANCE(20));

现金负债比:=(FINANCE(25)/FINANCE(15));

每股未分配:=CONST(FINANCE(32));

每股公积金:=CONST(FINANCE(18));

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;

SY17:=每股未分配>=2 AND 每股公积金>=2;SY18:=每股未分配<2 OR 每股公积金<2;

优秀:=SY01 AND SY03 AND SY05 AND SY07 AND SY09 AND SY11 AND SY13 AND SY15;

较好:=SY02 AND SY04 AND SY06 AND SY08 AND SY10 AND SY12 AND SY14 AND SY16;

一般:=NOT(优秀) AND NOT(较好);

DRAWTEXT_FIX(优秀 AND 较好=0,0.4,0.08,0,'综合评估基本面:优秀!'),COLORMAGENTA;

{DRAWGBK(优秀 AND O / REF(CLOSE, 1) < 1.03, RGB(255, 0, 0), RGB(255, 0, 0), 0, '11', 1);}

DRAWTEXT_FIX(优秀 AND 较好=0,0.4,0.09,0,'综合评估基本面:优秀!'),COLORMAGENTA;

{}

VAR1:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),25);

VAR2:=HIGH-REF(HIGH,1);

VAR3:=REF(LOW,1)-LOW;

VAR4:=SUM(IF(VAR2>0 AND VAR2>VAR3,VAR2,0),25);

VAR5:=SUM(IF(VAR3>0 AND VAR3>VAR2,VAR3,0),25);

VAR6:=VAR4*100/VAR1;

VAR7:=VAR5*100/VAR1;

VAR8:=MA(ABS(VAR7-VAR6)/(VAR7+VAR6)*100,15);

VAR9:=(VAR8+REF(VAR8,15))/2;

BUY1:=ZIG(3,10);

SELL1:=MA(BUY1,2);

{DRAWICON(CROSS(BUY1,SELL1),L-0.1,7);

DRAWICON(CROSS(SELL1,BUY1),H+0.1,8);}

VAR11:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;

VAR12:=SMA(VAR11,3,1);

VAR13:=SMA(VAR12,3,1);

VAR14:=VAR13 AND VAR13<20;

LJB:=1/WINNER(CLOSE);

MACD: "MACD.MACD", NODRAW;

W1: STICKLINE(MACD > 0, MACD, 0, 3, 1), COLORRED;

W2: STICKLINE(MACD < 0, MACD, 0, 3, 1), COLORCYAN;

VA1 := HHVBARS(MACD, BARSLAST(MACD < 0) + 1);

VA2 := CROSS(BACKSET(CROSS(0, MACD), REF(VA1, 1) + 2), 0.5);

QG := CROSS(BACKSET(CROSS(0, MACD) OR (ISLASTBAR AND MACD > 0), REF(VA1, 1) + 2), 0.5);

前高: DRAWLINE(VA2, MACD, REF(VA2, 1), REF(MACD, 1), 1), COLORMAGENTA;

VA3 := LLVBARS(MACD, BARSLAST(MACD > 0) + 1);

VA4 := CROSS(BACKSET(CROSS(MACD, 0), REF(VA3, 1) + 2), 0.5);

BD := BARSLAST(FILTERX(CROSS(0, MACD), BARSCOUNT(C)));

前低: DRAWLINE(VA4, MACD, REF(VA4, 1), REF(MACD, 1), 1);

BDTJ := IF(MACD < 0, FILTERX(MACD = LLV(MACD, BARSLAST(MACD > 0)), BARSCOUNT(C)), DRAWNULL);

TSBDTJ := BARSLAST(BDTJ);

BDZH := FILTERX(QG, BARSCOUNT(C));

BDTS := BARSLAST(BDZH);

本低: IF(BD + 1 >= 1, CONST(LLV(MACD, BD + 1)), DRAWNULL);

BDCL := CROSS(COUNT(CROSS(MACD > 本低 / 2 AND MACD < 0, 0.5), TSBDTJ) = 1, 0.5) AND TSBDTJ >= 0;

终点 := IF(ISLASTBAR AND MACD > 0 AND MACD = HHV(MACD, BARSLAST(MACD < 0)), 1,

IF(FILTERX(QG, BARSCOUNT(C)), 2, DRAWNULL));

UU := (终点 = 1 OR 终点 = 2) AND MACD > 0;

ZZ := FILTERX(UU, BARSCOUNT(C));

本高: DRAWLINE(ZZ, MACD, REF(ZZ, 1), REF(MACD, 1), 1), COLORWHITE;

横线 := CONST(REF(MACD, BARSLAST(ZZ)));

WW := MACD > 横线;

起始点 := FILTERX(REFX(BARSLAST(WW), 1) = 1, BARSCOUNT(C));

天数: BARSLAST(起始点), COLORYELLOW, NODRAW;

上横线: DRAWLINE(起始点, 横线, ZZ, 横线, 0), COLORGREEN, DOTLINE;

下横线: DRAWLINE(BDZH, CONST(LLV(MACD, BD + 1)), BDTJ = 1, MACD, 0), COLOR8080FF, DOTLINE;

DRAWNUMBER(BDTJ, CONST(LLV(MACD, BD + 1)) * 0.9, BDTS);

DRAWNUMBER(ZZ, 上横线 * 1.1, 天数);

TJ := IF(起始点, BARSNEXT(ZZ), DRAWNULL);

红柱数量: IF(天数 > 0 AND 天数 <= REF(TJ, 天数), SUM(MACD > 0, 天数), DRAWNULL), COLORWHITE, NODRAW;

横线起始价: REF(C, 天数), NODRAW;

空间评估: (横线起始价 - C) / C * 100, NODRAW;

TT := BARSLAST(ZZ);

WQG := CROSS(COUNT(CROSS(MACD < 本高 / 2 AND MACD > 0, 0.5), ZZ) = 1, 0.5) AND ZZ >= 0;

STICKLINE(MACD > 前高 AND 本高 > 前高 AND BARSLAST(CROSS(MACD < 本高 / 2, 0.5)) > 0 AND

MACD > (前高 + 本高) / 2, MACD, 前高, 1, 0), COLORYELLOW;

前高本高二分位: IF(MACD > 0 AND 本高 != 前高, DRAWLINE(WQG, (前高 + 本高) / 2, REF(WQG, 1), REF((前高 + 本高) / 2, 1), 1),

DRAWNULL), COLORC0C000, DOTLINE;

AA := STRCAT(STRCAT(STRCAT('〖', '上升空间'), '〗'), CON2STR(IF(空间评估, 空间评估, DRAWNULL), 2));

DRAWTEXT(WQG, MACD * 1.1, '本高成立'), COLORWHITE;

DRAWTEXT(BDCL, MACD * 1.1, '本低成立'), COLORYELLOW;

STICKLINE(MACD > 前高, MACD, 前高, 1, 0), COLORYELLOW;

STICKLINE(WQG, MACD, 0, 1, 0), COLORGREEN;

STICKLINE(MACD < 0 AND MACD < 前低 AND 前低 < 0, MACD, 前低, 1, 0), COLORBLUE;

B1 := IF(CROSS(MACD < 0, 0.5), BARSNEXT(BDTJ), DRAWNULL);

TSB1 := BARSLAST(MACD > 0) - 1;

STICKLINE(BARSLAST(BDCL) >= 0 AND MACD < 前低 AND MACD < 0, MACD, 前低, 1, 0), COLORGREEN;

STICKLINE(BDCL, MACD, 0, 1, 0), COLORWHITE;

STICKLINE(MACD > 前高 AND 本高 > 前高 AND BARSLAST(WQG) > 0, MACD, 前高, 1, 0), COLORRED;

DRAWTEXT(VA2 AND VA2 != UU, (MACD / 10) * 9, '前');

DRAWTEXT(VA2 AND VA2 != UU, MACD / 10, '高');

DRAWTEXT(ZZ, (MACD / 10) * 9, '本'), COLORWHITE;

DRAWTEXT(ZZ, MACD / 10, '高'), COLORWHITE;

DRAWTEXT(BDTJ, (MACD / 10) * 9, '低'), COLORRED;

DRAWTEXT(BDTJ, MACD / 10, '本'), COLORRED;

IF(BARSLAST(BDCL) >= 0, 本低 / 2, DRAWNULL), COLORRED, DOTLINE;