通达信龙头日线指标公式
通达信多空均衡主图指标公式
通达信龙头日线指标公式:
N:=9;
P:=14;
M:=26;
{指标}
个股涨幅:(C-REF(C,1))/REF(C,1)*100,COLORRED,NODRAW;
行业涨幅:(HY_INDEXC-REF(HY_INDEXC,1))/REF(HY_INDEXC,1)*100,COLORYELLOW,NODRAW;
大盘涨幅:(INDEXC-REF(INDEXC,1))/REF(INDEXC,1)*100,COLORCYAN,NODRAW;
A1:=MA(LLV(C,N)*1.1,P);
A2:=MA(HHV(C,M)*0.9,P);
DPC:=INDEXC;
A3:=MA(LLV(DPC,N)*1.1,P);
A4:=MA(HHV(DPC,M)*0.9,P);
HYC:=HY_INDEXC;
A31:=MA(LLV(HYC,N)*1.1,P);
A41:=MA(HHV(HYC,M)*0.9,P);
A5:=(A1+A2)/2;
A6:=(A3+A4)/2;
A61:=(A31+A41)/2;
A71:=C-A5-A5*(A61-EXPMEMA(HYC,3))/A61;{强于行业}
A7:=C-A5-A5*(A6-EXPMEMA(DPC,3))/A6;{强于大盘}
能量释放强大盘:=(A7>=0)*A7,COLORRED,NODRAW;
能量释放强行业:=(A71>=0)*A71,COLORYELLOW,NODRAW;
LTP:=C*CAPITAL/100,;{万股}
ER:=vol/LTP;
A8:=ER<2 AND C>O AND C>MA(C,7) AND
MA(C,7)>MA(C,37) AND A7>-0.9 AND VOL>MA(VOL,5);
{脉冲拉升:A8,COLORLIMAGENTA,NODRAW;
stICKLINE(A8,(A7>=0)*A7*1.7,0,0.8,-1)COLORLIMAGENTA;}
STICKLINE((A71>=0)*A71,(A7>=0)*A7*1.4,0,2,-1)COLORYELLOW;
STICKLINE((A71<0)*A71,(A7<0)*A7*1.4,0,2,-1)COLORCYAN;
STICKLINE((A7<0)*A7,0,(A7<0)*A7*1.2,3,0),COLOR779900;
STICKLINE((A7<0)*A7,0,(A7<0)*A7*1.2,2.2,0),COLOR77BB00;
STICKLINE((A7<0)*A7,0,(A7<0)*A7*1.2,1.5,0),COLOR77DD00;
STICKLINE((A7<0)*A7,0,(A7<0)*A7*1.2,0.5,0),COLOR77FF00;
STICKLINE((A7>=0)*A7,0,(A7>=0)*A7*1.2,3,0)COLOR000099;
STICKLINE((A7>=0)*A7,0,(A7>=0)*A7*1.2,2.2,0),COLOR0000BB;
STICKLINE((A7>=0)*A7,0,(A7>=0)*A7*1.2,1.5,0),COLOR0000DD;
STICKLINE((A7>=0)*A7,0,(A7>=0)*A7*1.2,0.5,0),COLOR0000FF;
DRAwrECTREL(487,5,999,999,0);
DRAWRECTREL(1,5,487,999,RGB(0,0,51));
{三强共振}
DRAWTEXT_FIX(ISLASTBAR,0.01,0.85,0,STRCAT(STRCAT('【情绪共振】 ',CON2STR(DRAWNULL,0)),' ')),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR AND 个股涨幅>=行业涨幅,0.25,0.85,1,STRCAT(STRCAT(' 个股强 ',CON2STR(DRAWNULL,0)),' ')),COLORRED;
DRAWTEXT_FIX(ISLASTBAR AND 个股涨幅<行业涨幅,0.25,0.85,1,STRCAT(STRCAT(' 个股弱 ',CON2STR(DRAWNULL,0)),' ')),COLORCYAN;
DRAWTEXT_FIX(ISLASTBAR AND 大盘涨幅<=行业涨幅,0.35,0.85,1,STRCAT(STRCAT(' 行业强 ',CON2STR(DRAWNULL,0)),' ')),COLORRED;
DRAWTEXT_FIX(ISLASTBAR AND 大盘涨幅>行业涨幅,0.35,0.85,1,STRCAT(STRCAT(' 行业弱 ',CON2STR(DRAWNULL,0)),' ')),COLORCYAN;
DRAWTEXT_FIX(ISLASTBAR AND REF(大盘涨幅,1)<=大盘涨幅,0.45,0.85,1,STRCAT(STRCAT(' 大盘强 ',CON2STR(DRAWNULL,0)),' ')),COLORRED;
DRAWTEXT_FIX(ISLASTBAR AND REF(大盘涨幅,1)>大盘涨幅,0.45,0.85,1,STRCAT(STRCAT(' 大盘弱 ',CON2STR(DRAWNULL,0)),' ')),COLORCYAN;
{量能基因}
DRAWTEXT_FIX(ISLASTBAR,0.01,0.75,0,STRCAT(STRCAT('【量能基因】今日量',CON2STR(V/10000,2)),'万')),COLORWHITE;
{个股行业大盘量比}
G今量比昨量:=V/REF(V,1);
D今量比昨量:=INDEXV/REF(INDEXV,1);
H今量比昨量:=HY_INDEXV/REF(HY_INDEXV,1);
JLZL1:=STRCAT('个股比昨: ',CON2STR(G今量比昨量,2));
JLZL2:=STRCAT(' 行业比昨: ',CON2STR(H今量比昨量,2));
JLZL3:=STRCAT(' 大盘比昨: ',CON2STR(D今量比昨量,2));
ZTTJ0:=STRCAT(JLZL1,JLZL2);
ZTTJ1:=STRCAT(ZTTJ0,JLZL3);
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.19,0.75,0,ZTTJ1),COLORYELLOW;
{股性活跃}
换手率%:=VOL/((FINANCE(7)-FINVALUE(244))/100)*100,NODRAW;
温和活跃:=IF(CAPITAL<500000,换手率%<7,IF(CAPITAL>=500000 AND CAPITAL<1000000,换手率%<5,
IF(CAPITAL>=1000000 AND CAPITAL<10000000,换手率%<3,
IF(CAPITAL>=10000000 AND CAPITAL<50000000,换手率%<1,IF(CAPITAL>=50000000,换手率%<0.5,DRAWNULL)))));
异动活跃:=IF(CAPITAL<500000,换手率%>7 AND 换手率%<=10,IF(CAPITAL>=500000 AND CAPITAL<1000000,换手率%>5 AND 换手率%<=7,
IF(CAPITAL>=1000000 AND CAPITAL<10000000,换手率%>3 AND 换手率%<=5,
IF(CAPITAL>=10000000 AND CAPITAL<50000000,换手率%>1 AND 换手率%<=3,IF(CAPITAL>=50000000,换手率%>0.5 AND 换手率%<=1,DRAWNULL)))));
非常活跃:=IF(CAPITAL<500000,换手率%>10 AND 换手率%<=14,IF(CAPITAL>=500000 AND CAPITAL<1000000,换手率%>7 AND 换手率%<=10,
IF(CAPITAL>=1000000 AND CAPITAL<10000000,换手率%>5 AND 换手率%<=7,
IF(CAPITAL>=10000000 AND CAPITAL<50000000,换手率%>3 AND 换手率%<=5,IF(CAPITAL>=50000000,换手率%>1 AND 换手率%<=3,DRAWNULL)))));
高度活跃:=IF(CAPITAL<500000,换手率%>14 AND 换手率%<=20,IF(CAPITAL>=500000 AND CAPITAL<1000000,换手率%>10 AND 换手率%<=14,
IF(CAPITAL>=1000000 AND CAPITAL<10000000,换手率%>7 AND 换手率%<=10,
IF(CAPITAL>=10000000 AND CAPITAL<50000000,换手率%>5 AND 换手率%<=7,IF(CAPITAL>=50000000,换手率%>3 AND 换手率%<=5,DRAWNULL)))));
极度活跃:=IF(CAPITAL<500000,换手率%>20,IF(CAPITAL>=500000 AND CAPITAL<1000000,换手率%>14,
IF(CAPITAL>=1000000 AND CAPITAL<10000000,换手率%>10,
IF(CAPITAL>=10000000 AND CAPITAL<50000000,换手率%>7,IF(CAPITAL>=50000000,换手率%>5,DRAWNULL)))));
DRAWTEXT_FIX(ISLASTBAR,0.01,0.65,0,STRCAT(STRCAT('【股性活跃】真实换手',CON2STR(换手率%,2)),'%')),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND 温和活跃,0.20,0.65,0,'温和活跃'),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND 异动活跃,0.20,0.65,0,'异动活跃'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND 非常活跃,0.20,0.65,0,'非常活跃'),COLORLIRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND 高度活跃,0.20,0.65,0,'高度活跃'),COLORLIMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND 极度活跃,0.20,0.65,0,'极度活跃'),COLORRED;
{涨停状态}
涨停:=IF(NAMELIKE('ST') OR NAMELIKE('*ST'),(C+0.01)>ZTPRICE(REF(C,1),0.05),IF(CODELIKE('688') OR (CODELIKE('300') AND DATE>=1200824),(C+0.01)>ZTPRICE(REF(C,1),0.2),
(C+0.01)>ZTPRICE(REF(C,1),0.1))) AND C=H;
ZTCS:=COUNT(涨停,BARSSINCE(涨停)+1);
DRAWTEXT_FIX(ISLASTBAR,0.01,0.55,0,STRCAT(STRCAT('【涨停状态】',CON2STR(DRAWNULL,0)),'')),COLORWHITE;
封单金额:=IF(FINANCE(3)==0,DRAWNULL,IF(GPJYVALUE(15,1,0)==2,GPJYVALUE(15,2,0),IF(GPJYVALUE(15,2,0)=0 AND 涨停,DYNAINFO(58)*DYNAINFO(20)*100/10000,0))),COLORYELLOW;
涨停溢价:=封单金额/(DYNAINFO(7)*CAPITAL*100/10000)*100;
涨停溢价高:=涨停 AND 涨停溢价>20;
涨停溢价中:=涨停 AND 涨停溢价>5 AND 涨停溢价<20;
涨停溢价低:=涨停 AND 涨停溢价<5;
失控板1:=涨停 AND VOL>HHV(REF(VOL,1),2)*2.1;
失控板2:=涨停 AND (C-REF(C,2))/REF(C,2)*100>=20 ;
失控板:=失控板1 AND 失控板2;
加速板:=涨停 AND NOT(失控板) AND (VOL<=REF(VOL,1)*0.7 OR VOL<=REF(VOL,2)*0.5);
分歧板:=涨停 AND NOT(失控板) AND NOT(加速板) ;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND 失控板,0.20,0.55,0,'失控板'),COLORLIRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND 分歧板,0.20,0.55,0,'分歧板'),COLORLIMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND 加速板,0.20,0.55,0,'加速板'),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND 涨停溢价低,0.35,0.55,0,'涨停溢价低'),COLORLIRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND 涨停溢价中,0.35,0.55,0,'涨停溢价中'),COLORLIMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1 AND 涨停溢价高,0.35,0.55,0,'涨停溢价高'),COLORRED;
B11:=BArslASTCOUNT(涨停);
连续板:=(B11>1 AND REFX(NOT(涨停),1)) OR (REF(涨停,1) AND 涨停 AND ISLASTBAR);
{DRAWTEXT(连续板,H*0.95,VARCAT(VAR2STR(B11,0),'天连板'))COLORYELLOW;}
DRAWTEXT_FIX(1 AND 连续板,0.30,0.55,1,STRCAT(STRCAT('【',CON2STR(B11,0)),'天连板】')),COLORRED;
通达信回撤利润指标公式