给大家分享一个关键涨停K线文字提示 主图指标 源码
ZT:=C/REF(C,1)>1.095;
STICKLINE(ZT,O,C,0.8,0),COLORYELLOW;
M5:MA(C,5);
M10:MA(C,10);
M20:MA(C,20);
M60:MA(C,60);
M30:MA(C,30),NODRAW;
M120:MA(C,120),NODRAW;
V55:=MA(V,55);
V33:=MA(V,33);
V3:=MA(V,4);
TJ0:=V33>V55;
TJ1:=C>O;
TJ2:=C>MA(C,55);
TJ3:=COUNT(CROSS(V3,V33),1)=1 AND TJ2 AND TJ1 AND TJ0;
TJ4:=COUNT(V/V33>2.2,1)=1 AND TJ1 AND TJ2;
DRAWTEXT(TJ3 OR TJ4,(C+O)/2,'<-放量'),COLORYELLOW;
{关键涨停K提示,突破55平台第一天涨停}
GTJ0:=33;
GTJ1:=COUNT(ZT,GTJ0)=1;
GTJ2:=C=HHV(H,GTJ0);
DRAWTEXT(GTJ1 AND GTJ2,M60,'<-关键涨停K线'),COLORYELLOW;
{STICKLINE(GTJ1 AND GTJ2,L,0,1,1);}
{关键突破}
TP1:=COUNT(C>HHV(H,33),33)=1;
TP2:=V/MA(V,33)>1.8;
DRAWTEXT(TP1 AND TP2,H,'<-关键突破'),COLORYELLOW;
价格振幅 := (H-L)/L*100;
换手率 := DYNAINFO(37)*100;
SZ := IF(CODELIKE('000') OR CODELIKE('002') OR CODELIKE('300'),1,0);
指数涨跌 := (INDEXC - REF(INDEXC,1))/REF(INDEXC,1)*100;
个股涨跌 := (C-REF(C,1))/REF(C,1)*100;
涨跌幅偏离SZ := IF(个股涨跌>9.7,10, 个股涨跌) - 指数涨跌 ;
涨跌幅偏离SH := 个股涨跌 - 指数涨跌;
{指数3日涨跌幅:= (INDEXC - REF(INDEXC,3))/REF(INDEXC,3)*100;
个股3日涨跌幅:= (C-REF(C,3))/REF(C,3)*100;
三日涨跌幅偏离:= ABS(个股3日涨跌幅-指数3日涨跌幅);}
三日涨跌幅SZ:= ABS(涨跌幅偏离SZ + REF(涨跌幅偏离SZ,1)+ REF(涨跌幅偏离SZ,2));
三日涨跌幅SH:= ABS(涨跌幅偏离SH + REF(涨跌幅偏离SH,1)+ REF(涨跌幅偏离SH,2));
{DRAWTEXT(ISLASTBAR AND 三日涨跌幅偏离 >= 20,H*1.04, VARCAT('3日涨跌幅振幅偏离达到20%: ',VAR2STR(三日涨跌幅偏离,1))),COLORRED;}
DRAWTEXT(ISLASTBAR AND SZ=1 AND 三日涨跌幅SZ >= 20, H*1.04,VARCAT('3日涨跌幅振幅偏离累计达到20%:',VAR2STR(三日涨跌幅SZ,1))),COLORRED;
DRAWTEXT(ISLASTBAR AND SZ=0 AND 三日涨跌幅SH >= 20, H*1.04,VARCAT('3日涨跌幅振幅偏离累计达到20%:',VAR2STR(三日涨跌幅SH,1))),COLORRED;
DRAWTEXT(ISLASTBAR AND 价格振幅 >= 15,H, VARCAT('当日价格振幅达到15%: ',VAR2STR(价格振幅,1))),DRAWABOVE,COLORRED;
DRAWTEXT(ISLASTBAR AND 换手率 >= 20, (H+L)/2, VARCAT('当日换手率达到20%: ',VAR2STR(换手率,1))),COLORYELLOW;
DRAWTEXT(ISLASTBAR AND SZ=1 AND ABS(涨跌幅偏离SZ)>7, L,VARCAT('当日涨跌幅偏离值达到±7%:',VAR2STR(涨跌幅偏离SZ,1))),COLORRED;
DRAWTEXT(ISLASTBAR AND SZ=0 AND ABS(涨跌幅偏离SH)>7, L,VARCAT('当日涨跌幅偏离值达到±7%:',VAR2STR(涨跌幅偏离SH,1))),COLORRED;
{龙虎榜}
LHB:=SIGNALS_USER(490,0)-SIGNALS_USER(491,0); {龙虎榜净买入额}
DRAWTEXT(LHB>0 AND LHB<10000,L*0.99,VARCAT(VARCAT('●',VAR2STR(LHB,2)),'万')),COLORMAGENTA;
DRAWTEXT(LHB>10000,L*0.99,VARCAT(VARCAT('●',VAR2STR(LHB/10000,2)),'亿')),COLORMAGENTA;
DRAWTEXT(LHB<0 AND LHB>-10000,L*0.99,VARCAT(VARCAT('○',VAR2STR(LHB,2)),'万')),COLORGREEN;
DRAWTEXT(LHB<-10000,L*0.99,VARCAT(VARCAT('○',VAR2STR(LHB/10000,2)),'亿')),COLORGREEN;
{大宗成交额}
{大宗:=SIGNALS_USER(588,0)*SIGN(SIGNALS_USER(588,0)),NODRAW;
DRAWTEXT(大宗>0,(H+L)/2,VARCAT(VARCAT('---大宗',VAR2STR(大宗,0)),'万')),COLORYELLOW;};