通达信牛熊趋势指标公式

通达信辞旧迎新+选股指标公式

通达信牛熊趋势指标公式:
{KKDD大趋势}

LOWV1:=EMA(LLV(LOW,34),3);

HIGHV1:=EMA(HHV(HIGH,34),3);

RSV1:=EMA((CLOSE-LOWV1)/(HIGHV1-LOWV1)*100,3);

KK:=SMA(RSV1,8,1),COLOR4080FF,LINETHICK1;

DD:=SMA(KK,6,1),COLOR008000,LINETHICK1;

DRAWBAND(KK,RGB(200,0,200),DD,RGB(100,100,100));

{一三买入法}

MA10:=MA(CLOSE,10);

MA34:=MA(CLOSE,34);

{倍量表示:今日大于昨日2倍量}

volUME:=VOL;

TJ:=(V/REF(V,1)>2) AND MA10<MA34 AND MA10>REF(MA10,1);

三连阴:=LAst(C<O,3,0);

三缩量:=LAST(VOL<REF(VOL,1),3,0);

选股:=REF(三连阴,1)>0 AND REF(三缩量,1)>0 AND O<C AND TJ;

STICKLINE(选股,0,40,1.2,0),COLORRED;

DRAWTEXT(选股>0.9,38,'一三买'),COLORRED,LINETHICK1;

{盘整突破}

突破角度:=(ATAN((MA(CLOSE,5)/REF(MA(CLOSE,5),1)-1)*100)*180/3.14115926)>55;

{>45 数字可调整为你喜欢的任何角度}

去除停牌:=DYNAINFO(17)!=0;

VARR:=(C+H+O+L)/4;

上轨:=EMA(VARR,10)*1.09;

盘整突破:=LAST((H-L)/REF(C,1)<0.1,20,0) AND VOL>REF(VOL,1)*1.5 AND C>REF(C,1)*1.03

AND "dmi.pdi">"DMI.mdi" AND"DMI.ADXR">"DMI.MDI"AND "DMI.PDI">"DMI.ADX"

AND(crOSS("DMI.ADX","DMI.ADXR")OR("DMI.ADX">"DMI.ADXR"))

AND"kdj.D">REF("kdJ.D",1) AND"KDJ.D"<75 AND C<上轨 AND 突破角度 AND 去除停牌;

STICKLINE(盘整突破,0,45,1.2,0),COLORWHITE;

DRAWTEXT(盘整突破,45,'突破'),COLORWHITE,LINETHICK1;

{财神到}

XXBB:= EMA((CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*4,5)*100;

财神到:=REF(XXBB,1)<50 AND XXBB-REF(XXBB,1)>25;

STICKLINE(财神到,33,50,3,0),COLOR2222AA;

STICKLINE(财神到,16.5,33,3,0),COLOR11AA88;

STICKLINE(财神到,0,16.5,3,0),COLORAAAA00;

DRAWTEXT(财神到,44.5,'财'),COLORYELLOW;

DRAWTEXT(财神到,27.5,'神'),COLORYELLOW;

DRAWTEXT(财神到,10.5,'到'),COLORYELLOW;

{爆点淑女宣选股}

{淑女宣}

左手:=C-REF(C,1);

秋天:=100*EMA(EMA(左手,6),6)/EMA(EMA(Abs(左手),6),6);

梦想:=LLV(秋天,2)=LLV(秋天,7) AND COUNT(秋天<0,2) AND CROSS(秋天,MA(秋天,2));

十三:=FINANCE(37)<=60000;

十三的思想:=(C-REF(C,20))/REF(C,20)*100<0;

淑女宣:=FILTER(梦想=1,5) AND cci>0 AND 十三 AND 十三的思想;

爆点:=LLV(L,3)=LLV(L,45) AND C/REF(C,1)>=1.04 AND 淑女宣;

I爆点:STICKLINE(爆点>0,0,65,2,0),COLORLIRED;

DRAWTEXT(爆点,45,'爆点'),COLORRED;

STICKLINE(淑女宣,0,38,1.2,0),COLOR008800;

STICKLINE(淑女宣,0,38,0.8,0),COLOR00AA00;

STICKLINE(淑女宣,0,38,0.4,0),COLOR00CC00;

STICKLINE(淑女宣,0,38,0,0),COLOR00FF00;

DRAWTEXT(淑女宣,35,'淑女买'),COLOR00FF00,LINETHICK1;

{买}

A5:=C-REF(C,1);

A6:=100*EMA(EMA(A5,6),6)/EMA(EMA(ABS(A5),6),6);

RMA1:=EMA(CLOSE,7);

NMA1:=EMA(CLOSE,19);

UP1:=DRAWLINE(L=LLV(L,BArslAST(CROSS(NMA1,RMA1))+1),LLV(L,BARSLAST(CROSS(NMA1,RMA1))+1),H

=HHV(H,BARSLAST(CROSS(RMA1,NMA1))+1),HHV(H,BARSLAST(CROSS(RMA1,NMA1))+1),0);

DOWN1:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(RMA1,NMA1))+1),HHV(H,BARSLAST(CROSS(RMA1,NMA1))+1),L

=LLV(L,BARSLAST(CROSS(NMA1,RMA1))+1),LLV(L,BARSLAST(CROSS(NMA1,RMA1))+1),0);

买入:=(LLV(A6,2)=LLV(A6,7) AND COUNT(A6<0,2) AND CROSS(A6,MA(A6,2))) AND

REF(DOWN1,1)<REF(DOWN1,2) AND UP1>REF(DOWN1,1);

IF(买入,0,35),COLORCYAN,LINETHICK2;

{短线买点选股}

DIFF1:=EMA(DCLOSE,12)-EMA(DCLOSE,26);

短线买点:=CROSS(((DIFF1-EMA(DIFF1,9))*10-REF((DIFF1-EMA(DIFF1,9))*10,1)),1) AND (DIFF1-EMA(DIFF1,9))*10>1;

IF(短线买点,60,0),LINETHICK2,COLOR00FFFF;

DRAWTEXT(短线买点>0,35,'短买'),LINETHICK1,COLOR00FFFF;

{今买明卖}

MA20:=MA(C,20);

MA30:=MA(C,30);

QSXS:=MA20>MA30 AND MA20>REF(MA20,1) AND MA30>REF(MA30,1);

ZF:=(C/REF(C,1)-1)*100;

N1:=BARSLAST(CROSS(C,MA(C,5)));

N2:=BARSLAST(CROSS(MA(C,5),C));

HM:=IF(N1<N2,N1+1,0)*QSXS;

Z2:=HM=1 AND ZF>=0 AND C>O AND QSXS;

KX1:=ZF<=-3 AND C<O;

XDSJ:=BARSLAST(KX1);

KX2:=ZF>=3 AND C>O;

JBY:=KX2 AND XDSJ<=2 AND C>=REF(O*0.99,XDSJ) AND ZF>ABS(REF(ZF,XDSJ)*0.99);

Z3:=IF(FILTER(JBY,1) AND QSXS,5,0);

今买明卖:=Z2 AND Z3;

IF(今买明卖,35,0),LINETHICK2,COLORGREEN;

DRAWTEXT(今买明卖>0,30,'买卖'),LINETHICK1,COLORGREEN;

{横盘启动突破}

LOWV:=LLV(LOW,15); {15天内的最低价}

HIGHV:=HHV(HIGH,15); {15天内的最高价}

HIGHVV:=HHV(HIGH,40); {40天内的最高价}

V0:=V; {当天的成交量}

V1:=REF(V,1); {一天前的成交量}

V2:=REF(V,2); {两天前的成交量}

V3:=REF(V,3); {三天前的成交量}

HV22:=HHV(V,35); {35天内的最大成交量}

D0U:=C>O; {今天是阳线}

D1U:=REF(C,1)>=REF(C,2); {昨天是阳线}

横盘:=((HIGHV-LOWV)/HIGHV)<0.15; {半个月内价格波动小于15%}

放量1:=V0>=(1.8*((V1+V2+V3)/3)); {今天量是前三天均量的1.8倍}

放量2:=V0<=(3.8*V1); { 今天的量在昨天量的四倍范围内}

今天阳线:=D0U; {今天是阳线}

昨天阳线:=D1U; {昨天是阳线}

今天中阳:=(C-REF(C,1))/REF(C,1)>=0.018; {今天涨幅大于1.8%}

开盘非最高价:=C<=HIGHVV; {收盘非40天内最高价}

收盘非最高价:=O<=HIGHVV; {开盘非40天内最高价}

非最大成交量:=V0<HV22; {非一个月内最高成交量}

启动突破:=(横盘 AND 放量1 AND 放量2 AND 今天阳线 AND 昨天阳线 AND 今天中阳 AND 开盘非最高价 AND 收盘非最高价 AND

非最大成交量) AND 盘整突破;

IF(启动突破>0,40,0),COLORWHITE,LINETHICK2;

DRAWTEXT(启动突破>0,30,'启动'),COLORFFFFFF;

{中顶大顶}

X:=MA(AMOUNT,5)/MA(V,5)/100;

VAR9:=(X-MA(AMOUNT,125)/MA(V,125)/100)/X;

VAR11:=MA((LLV(L,45)-C)/(HHV(H,45)-LLV(L,45))*100,3);

VAR12:=C/MA(C,60)-1;

中顶:IF(CROSS(VAR11,-95) AND VAR12<0.35 AND VAR12>=0.2,-60,0),COLORMAGENTA,LINETHICK2;

DRAWTEXT(中顶<0,-30,'中顶'),COLORMAGENTA,LINETHICK1;

大顶:IF(CROSS(VAR11,-95) AND VAR12>=0.35,-60,0),COLORFF7F00,LINETHICK2;

DRAWTEXT(大顶<0,-30,'大顶'),COLORFF7F00,LINETHICK1;

0,COLORRED,LINETHICK2;

DIF:(EMA(CLOSE,5)-EMA(CLOSE,27))/((EMA(CLOSE,5)+EMA(CLOSE,27))/2)*1000,COLOR00FFFF;

DEA1:=EMA(DIF,9),COLORWHITE;

macd:2*(DIF-DEA1),NODRAW,COLORRED;

{红绿箭头}

DRAWICON(CROSS(DIF,DEA1),DEA1,1);

DRAWICON(CROSS(DEA1,DIF),DEA1,2);

{DIF变色线没有未来函数}

DEA:EMA(DIF,9),COLORWHITE,LINETHICK2;

{自动射线}

obv:=DIF;

P:=12;

A1:=REF(OBV,P)=HHV(OBV,2*P+1);

B1:=FILTER(A1,P);

C1:=BacKSET(B1,P+1);

D1:=FILTER(C1,P);{高点1}

R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);

S11:=R11>REF(R11,1);

蓝:DRAWLINE(D1,OBV,S11,OBV,1),COLORFF7F00,LINETHICK1;

A2:=REF(OBV,P)=LLV(OBV,2*P+1);

B2:=FILTER(A2,P);

C2:=BACKSET(B2,P+1);

D2:=FILTER(C2,P);{低点1}

T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);

U11:=T11>REF(T11,1);

粉:DRAWLINE(D2,OBV,U11,OBV,1),COLORLIRED,LINETHICK1;

Q2:=INTPART(3*8/18);

A22:=REF(OBV,Q2)=LLV(OBV,2*Q2+1);

B22:=FILTER(A22,Q2);

C22:=BACKSET(B22,Q2+1);

D22:=FILTER(C22,Q2);{低点2}

T112:=BACKSET(ISLASTBAR,BARSLAST(D22)+1);

U112:=T112>REF(T112,1);

红:DRAWLINE(U11,OBV,U112,OBV,1),COLORRED,LINETHICK1;

HHV(IF(U11,OBV,DRAWNULL),0),COLOR00FFFF,LINETHICK1;

DIF,IF(DEA,DIF,DRAWNULL),COLOR00FFFF,LINETHICK2;

IF(DIF<REF(DIF,1),DIF,DRAWNULL),COLORGREEN,LINETHICK2;

IF(DIF>REF(DIF,1),DIF,DRAWNULL),COLORRED,LINETHICK2;

8,COLOR00FFFF,POINTDOT,LINETHICK2;

80,COLOR008000,POINTDOT,LINETHICK2;

通达信抄底绝杀指标公式