所属板块:=STRCAT('【所属板块】:',STRCAT(STRCAT(' [行业]—',HYBLOCK),STRCAT(' [概念]—',GNBLOCK))); 风格板块:=STRCAT('【风格板块】:',STRCAT(STRCAT(' [地域]—',DYBLOCK),STRCAT(' [风格]—',FGBLOCK))); 总股本:=STRCAT(STRCAT(' 总股本:',CON2STR(TOTALCAPITAL/1000000,2)),'亿'); 流通盘:=STRCAT(STRCAT(' 流通盘:',CON2STR(CAPITAL/1000000,2)),'亿'); 全流通:=STRCAT(STRCAT(' 流通比:',CON2STR(CAPITAL/TOTALCAPITAL*100,2)),'%'); 市值:=STRCAT(STRCAT(' 流通市值:',CON2STR((CAPITAL/1000000)*C,2)),'亿'); 股本市值:=STRCAT('【股本市值】:',STRCAT(STRCAT(STRCAT(总股本,流通盘),全流通),市值)); 市盈率:=STRCAT(' 市盈率:',CON2STR(C/FINANCE(33),2)); 净资收益率:=STRCAT(' 净资收益率:',CON2STR(FINANCE(33)/FINANCE(34)*100,2)); 主营利润率:=STRCAT(' 主营利润率:',CON2STR(FINANCE(23)/FINANCE(20)*100,2)); 当前业绩:=STRCAT('【当前业绩】:',STRCAT(STRCAT(市盈率,净资收益率),主营利润率)); DRAWTEXT_FIX(ISLASTBAR,0.005,0.02,0,所属板块),COLORYELLOW; DRAWTEXT_FIX(ISLASTBAR ,0.005,0.07,0,风格板块),COLORYELLOW; DRAWTEXT_FIX(ISLASTBAR,0.005,0.12,0,股本市值),COLORMAGENTA;DRAWTEXT_FIX(ISLASTBAR,0.005,0.17,0,当前业绩),COLORMAGENTA; DRAWTEXT_FIX(C>O,0.01,0.9,0,'微信公众号:股指标网'),COLOR0000FF; TS:=CURRBARSCOUNT; TS1:=BARSSINCE(C)+1; 常数:=CONST(BARSSINCE(C)); H1:=REFX(H,常数-TS1*2+2); H2:=REF(H,常数-TS*2+2); L1:=REFX(L,常数-TS1*2+2); L2:=REF(L,常数-TS*2+2); LL:=IF(TS>TS1,L1,L2); HH:=IF(TS>TS1,H1,H2); 上跳空:=HH<REF(LL,1); 上跳空成立:=上跳空 AND HH<REF(LLV(LL,0),1); 上跳条件:=SUM(上跳空成立,BARSSINCE(C))=1 AND 上跳空成立; 上跳高点:CONST(REF(IF(上跳条件,REF(LLV(LL,0),1),0),BARSLAST(上跳条件))),NODRAW; HD:=CONST(上跳高点); 上跳:=REF(上跳条件,常数-TS*2+2) OR REFX(上跳条件,常数-TS1*2+2); LD:=CONST(REF(H,BARSLAST(上跳))); 上跳低点:REF(H,BARSLAST(上跳)),NODRAW; STICKLINE(ISLASTBAR,上跳高点,REF(H,BARSLAST(上跳)),BARSLAST(上跳)*8,0),COLOR00009B;{画线延长段,若不需要此行删除}; DRAWBAND(上跳高点,RGB(155,0,0),REF(H,BARSLAST(上跳)),0); PD1:=ABS(HD-LD)/MIN(HD,LD)*100<3 AND L<=CONST(MAX(HD,LD))*1.01 AND L>CONST(MAX(HD,LD)) AND 上跳低点<>DRAWNULL AND C<O; 下跳空:=LL>REF(HH,1); 下跳空成立:=下跳空 AND LL>REF(HHV(HH,0),1); 下跳条件:=SUM(下跳空成立,BARSSINCE(C))=1 AND 下跳空成立; 下跳高点:=CONST(REF(IF(下跳条件,REF(HHV(HH,0),1),0),BARSLAST(下跳条件))),NODRAW; 下跳:=REF(下跳条件,常数-TS*2+2) OR REFX(下跳条件,常数-TS1*2+2); STICKLINE(ISLASTBAR,下跳高点,REF(L,BARSLAST(下跳)),BARSLAST(下跳)*8,0),COLOR54AD02;{画线延长段,若不需要此行删除}; PD2:=ABS(HD-LD)/MIN(HD,LD)*100<3 AND L=CONST(MAX(HD,LD)) AND C<O AND 上跳低点<>DRAWNULL; DRAWBAND(REF(L,BARSLAST(下跳)),RGB(2,173,84),下跳高点,0); DRAWKLINE(H,O,L,C); PD3:=BARSLASTCOUNT(上跳低点<>DRAWNULL); DRAWICON((PD1 OR PD2) AND PD3>4,L,3); |