DRAWTEXT(FILTER(D2>0,3),H*1.06,'K顶'),COLORRED;{KDJ顶背离}
C3:=BARSLAST(REF(CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));
D3:=REF(C,C3+1)<C AND REF("RSI.RSI1"(6,12,24),C3+1)>"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24));
DRAWTEXT(FILTER(D3>0,5),H*1.06,'R顶'),COLORFF00FF;{RSI顶背离};
LC:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
DRAWTEXT(CROSS(FF,MA15),(LOW * 0.99),'底背'),Color0000FF;
DRAWTEXT(CROSS(88,RSI),(HIGH * 1.02),'顶背'),Color00FFFF;
vll:=cross(ma(c,10),ma(c,21));
DRAWTEXT(vll,m8,''),colorwhite;
DRAWTEXT(vll,m8-0.09,'圆弧底'),colorwhite;
DRAWTEXT(CROSS(80,RSI) ,high*1.02,'见顶'),coloryellow;
Varb:=SMA(MAX(CLOSE-LC,0),7,1)/SMA(ABS(CLOSE-LC),7,1)*100;
Varc:=SMA(MAX(CLOSE-LC,0),13,1)/SMA(ABS(CLOSE-LC),13,1)*100;
Vard:=BARSCOUNT(CLOSE);
Var1:=(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3))*100-60;
Var2:=SMA(Var1,3,1)+100;
Var3:=(CLOSE-LLV(LOW,3))/(HHV(HIGH,3)-LLV(LOW,3))*1000;
Var4:=SMA(Var3,3,1);Var5:=SMA(Var4,3,1)+100;Var6:=Var5-Var2;
主力:=EMA( (CLOSE-MA(CLOSE,3))/MA(CLOSE,3)*4800,2);
散户:=EMA( (CLOSE-MA(CLOSE,20))/MA(CLOSE,20)*4800,7);
drawtext(cross(主力,散户) and 主力<0 and 散户<0,low,'见底'),colorred;
drawtext(cross(散户,主力) and 主力<0 and 散户<0,high*1.02,'清仓'),colorgreen;
var120:='■坐底飙升提示今日上穿';
if CROSS(c,ma(c,5)) AND BARSTATUS=2 THEN var120:=var120+'【5】均线'+NUMTOSTRN(ma(c,5),2)+'元';
if CROSS(c,ma(c,10)) AND BARSTATUS=2 THEN var120:=var120+'【10】均线'+NUMTOSTRN(ma(c,10),2)+'元';
if CROSS(c,ma(c,20)) AND BARSTATUS=2 THEN var120:=var120+'【20】均线'+NUMTOSTRN(ma(c,20),2)+'元';
if CROSS(c,ma(c,30)) AND BARSTATUS=2 THEN var120:=var120+'【30】均线'+NUMTOSTRN(ma(c,30),2)+'元';
if CROSS(c,ma(c,40)) AND BARSTATUS=2 THEN var120:=var120+'【40】均线'+NUMTOSTRN(ma(c,40),2)+'元';
if CROSS(c,ma(c,50)) AND BARSTATUS=2 THEN var120:=var120+'【50】均线'+NUMTOSTRN(ma(c,50),2)+'元';
if CROSS(c,ma(c,60)) AND BARSTATUS=2 THEN var120:=var120+'【60】均线'+NUMTOSTRN(ma(c,60),2)+'元';
if CROSS(c,ma(c,120)) AND BARSTATUS=2 THEN var120:=var120+'【120】均线';
if (c>=ma(c,10)) AND BARSTATUS=2 THEN var120:=var120+'■在10均线上方■'+NUMTOSTRN(ma(c,10),2)+'元';
DRAWTEXTREL(600,900,var120),Color8000FF;
var121:='■坐底飙升提示今日下破';
if CROSS(ma(c,5),c) AND BARSTATUS=2 THEN var121:=var121+'【5】均线'+NUMTOSTRN(ma(c,5),2)+'元';
if CROSS(ma(c,10),c) AND BARSTATUS=2 THEN var121:=var121+'【10】均线'+NUMTOSTRN(ma(c,10),2)+'元';
if CROSS(ma(c,20),c) AND BARSTATUS=2 THEN var121:=var121+'【20】均线'+NUMTOSTRN(ma(c,20),2)+'元';
if CROSS(ma(c,30),c) AND BARSTATUS=2 THEN var121:=var121+'【30】均线'+NUMTOSTRN(ma(c,30),2)+'元';
if CROSS(ma(c,40),c) AND BARSTATUS=2 THEN var121:=var121+'【40】均线'+NUMTOSTRN(ma(c,40),2)+'元';
if CROSS(ma(c,50),c) AND BARSTATUS=2 THEN var121:=var121+'【50】均线'+NUMTOSTRN(ma(c,50),2)+'元';
if CROSS(ma(c,60),c) AND BARSTATUS=2 THEN var121:=var121+'【60】均线'+NUMTOSTRN(ma(c,60),2)+'元';
if CROSS(ma(c,120),c) AND BARSTATUS=2 THEN var121:=var121+'【120】均线';
if (ma(c,10)>=c) AND BARSTATUS=2 THEN var121:=var121+'■在10均线下方■'+NUMTOSTRN(ma(c,10),2)+'元';
DRAWTEXTREL(600,960,var121),Color00FF00;
每股收益:=FINANCE2(3);
每股市盈率:=DYNAINFO(39);
每股净资产:=FINANCE2(4);
销售毛利率:=FINANCE2(12);
主营收入同比:=FINANCE2(11);
净利润同比增长:=FINANCE2(10);
DRAWTEXTABS(20,40,'基本面提示:'),ColorFFFFFF,LINETHICK1;
DRAWTEXTABS(100,40,'每股收益:'+NUMTOSTRN(每股收益,2)+'元'),ColorFFFFFF;
DRAWTEXTABS(200,40,'每股市盈率:'+NUMTOSTRN(每股市盈率,1)+'倍'),ColorFFFFFF;
DRAWTEXTABS(350,40,'每股净资产:'+NUMTOSTRN(每股净资产,2)+'元'),ColorFFFFFF;
DRAWTEXTABS(85,55,' 销售毛利率:'+NUMTOSTRN(销售毛利率,2)+'%'),LINETHICK1,ColorFFFFFF;
DRAWTEXTABS(200,55,'主营收入同比增长:'+NUMTOSTRN(主营收入同比,2)+'%'),LINETHICK1,ColorFFFFFF;
DRAWTEXTABS(350,55,'净利润同比增长:'+NUMTOSTRN(净利润同比增长,2)+'%'),LINETHICK1,ColorFFFFFF;
DRAWTEXTABS(20,70,'换手率提示:'),Coloryellow,LINETHICK1;
当日换手率:=sum(100*v/capital,1);
DRAWTEXTABS(100,70,'当日换手:'+NUMTOSTRN(当日换手率,2)+'%'),Coloryellow,LINETHICK1;
五日换手率:=sum(100*v/capital,5);