通达信机构指标公式

    LC:=REF(CLOSE,1);

    RSI5:=((SMA(MAX((CLOSE-LC),0),5,1)/SMA(ABS((CLOSE-LC)),5,1))*100);

    TR1:=SUM(MAX(MAX((HIGH-LOW),ABS((HIGH-REF(CLOSE,1)))),ABS((LOW-

    REF(CLOSE,1)))),10);

    HD:=(HIGH-REF(HIGH,1));

    LD:=(REF(LOW,1)-LOW);

    DMP:=SUM(IF(((HD>0)AND(HD>LD)),HD,0),10);

    DMM:=SUM(IF(((LD>0)AND(LD>HD)),LD,0),10);

    PDI:=((DMP*100)/TR1);

    MDI:=((DMM*100)/TR1);

    ADX:=MA(((ABS((MDI-PDI))/(MDI+PDI))*100),5);

    AV:=(RSI5+ADX);

    DXR:=(((ADX+REF(ADX,5))/2)+RSI5);

    WR10:=((100*(HHV(HIGH,10)-CLOSE))/(HHV(HIGH,10)-LLV(LOW,10)));

    NEWvol:=(RSI5-WR10);

    最佳买入:=(AV+NEWVOL);

    买入选股:IF(CROSS(最佳买入,0),4,0),STICK,COLOR00FFFF,LINETHICK2;

    VARA1:=SMA(买入选股,3,1);

    VARA2:=SMA(VARA1,3,1),COLOR0000FF;

    VARA3:=SMA(VARA2,3,1),COLOR00FFFF;

    建仓买点:IF(CROSS(VARA2,VARA3)AND(VARA2<40),5,0*10000),COLOR0000FF,LINETHICK1;

    STICKLINE(建仓买点,0,1.5,6,0),COLORFF80FF;

    STICKLINE(建仓买点,0.5,2.8,2,0),COLOR3000FF;

    RSV:=(((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9)))*50);

    K:=SMA(RSV,3,1);

    D:=SMA(K,3,1);

    J:=3*K-2*D;

    X:=LLV(J,2)=LLV(J,8);

    最佳买入时机:IF(CROSS(J,3),1,0),STICK,COLORFFFF00;

    STICKLINE(最佳买入时机,0,1,3,0),COLOR009999;

    STICKLINE(最佳买入时机,0,1,2,0),COLOR00DDDD;

    STICKLINE(最佳买入时机,0,1,1,0),COLOR00FFFF;

    机构建仓:IF(最佳买入<5,-0.5,0),STICK,COLOR00FF00,LINETHICK1;

    机构建仓日:STICKLINE(机构建仓,0,-1,4,1),COLOR00FF00,LINETHICK5;

    趋势:3*SMA((CLOSE-

    LLV(LOW,38))/(HHV(HIGH,38)-LLV(LOW,38))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/

    (HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),LINETHICK2,COLORFF99FF,NODRAW;

    备钱:IF(趋势<=20,-0.8,0),COLORD0D0D0,STICK,LINETHICK3;

    快买:IF(趋势<=10,1,0),COLORFF38FF,STICK,LINETHICK3;

    BIAS1:=(C-MA(C,6))/MA(C,6)*100,COLORFFDDCC;

    BIAS2:(C-MA(C,13))/MA(C,13)*100,COLORFFFFFF,LINETHICK1;

    BIAS3:=(C-MA(C,26))/MA(C,26)*100,COLORFFFFFF,LINETHICK1;

    乖离:(BIAS1+2*BIAS2+3*BIAS3)/6,COLOR00FFFF;

    乖离超限:MA(乖离,3),COLORFF80FF;

    STICKLINE(CROSS(乖离,乖离超限)AND乖离超限<-9,-4,0,1,1),COLORFFFFFF;

    STICKLINE(CROSS(乖离超限,乖离)AND乖离>10,6,0,3,0),COLORFF88FF;

    DRAWBAND(MA(乖离,1),RGB(240,120,40),MA(乖离超限,1),RGB(256,200,20));

    警跌:IF(BIAS2<REF(BIAS2,1),BIAS2,DRAWNULL),COLORFF6128,LINETHICK3;

    回升:IF(BIAS2>REF(BIAS2,1),BIAS2,DRAWNULL),COLOR00FFFF,LINETHICK3;

    R:SMA(MAX(CLOSE-REF(C,1),0),6,1)/SMA(ABS(CLOSE-

    REF(C,1)),6,1)*100,COLORFFCCFF,NODRAW;

    R2:SMA(MAX(CLOSE-REF(C,1),0),13,1)/SMA(ABS(CLOSE-

    REF(C,1)),13,1)*100,COLOR00CCFF,NODRAW;

    STICKLINE(CROSS(R2,R)ANDR2>78,2,0,3,-1),COLOR30FFFF;

    CC:=(C-REF(C,1))/REF(C,1)*100>1.2;

    DD:=L<MA(C,5)*0.921;

    EE:=V<MA(V,5)*1.5;

    老鼠仓:=(L<(AMOUNT/V)*0.9)ANDCCANDDDANDEE,LINETHICK0,COLOR0099FF;

    DRAWTEXT(老鼠仓,-5,'老鼠仓'),COLORFFFFFF;

    选底:TROUGHBARS(3,15,1)<4,NODRAW;

    DRAWTEXT(FILTER(选底=1,3),-2,'底部'),COLOR00FF00;

    头部:=IF((PEAKBARS(3,15,1)<10)=1,2,0);

    快逃:=IF(头部>REF(头部,1),H,0),COLORWHITE,NODRAW;

    DRAWTEXT(快逃=H,6,'头部'),COLOR0000FF,LINETHICK1;

    STICKLINE(CROSS(乖离,BIAS1)ANDBIAS2>15,乖离,0,1,0),COLOR3300FF;

    DRAWICON(CROSS(乖离,BIAS1*0.382),-1,1),COLORGREEN;

image.png

     通达信机构专用指标公式

                  

    N:=20;

    N1:=7;

    N2:=69;

    T1:=IF((DATE<=1341231),1,0);

    M3:=EMA(CLOSE,3);

    M8:EMA(CLOSE,8),COLOR008000;

    M13:EMA(M8,13),COLOR0000FF;

    M34:EMA(M8,34),COLORF0F000;

    VAR1:=EMA(M13,34);

    M55:EMA(M34,55),COLOR00FFFF;

    M144:EMA(VAR1,144),LINETHICK2,COLOR0000FF;

    M250:EMA(VAR1,250),POINTDOT,LINETHICK2,COLORF00FF0;

    VAR2:=(CLOSE+HIGH+LOW)/(3);

    VAR3:=(EMA(VAR2,10))*(T1);

    VAR4:=(REF(VAR3,1))*(T1);

    STICKLINE((VAR3>VAR4),VAR3,VAR4,4,0),COLOR00FFFF;

    STICKLINE((VAR3<VAR4),VAR3,VAR4,4,0),COLORFF0000;

    VAR5:=((REF(HIGH,1)+REF(LOW,1))/(2))*(T1);

    VAR6:=MA(CLOSE,N)+((2)*(STD(CLOSE,N)))*(T1);

    DRAWTEXT(CROSS(VAR3,VAR4),(VAR3)*(0.98),'★'),COLOR00FFFF;

    DRAWTEXT(CROSS(VAR5,VAR6),(HIGH)*(1.04),'↓卖'),COLOR008000;

    VAR7:=REF(CLOSE,1);

    VAR8:=((SMA(MAX(CLOSE-VAR7,0),N1,1))/(SMA(ABS(CLOSE-VAR7),N1,1)))*(100);

    VAR9:=CROSS(N2,VAR8);

    VARA:=(FILTER(VAR9,4))*(T1);

    DRAWTEXT(VARA,(HIGH)*(1.04),'↓卖'),COLORFFFFFF;

    VARB:=((2)*(CLOSE)+HIGH+LOW)/(4);

    VARC:=LLV(LOW,34);

    VARD:=HHV(HIGH,34);

    VARE:=(EMA(((VARB-VAR1)/(VAR5-VAR1))*(100),7))*(T1);

    VARF:=(EMA((0.667)*(REF(VARE,1))+(0.333)*(VARE),5))*(T1);

    DRAWTEXT(IF(((COUNT((CLOSE0.6)AND(VOL>=(1.5)*(MA(VOL,5)))AND

    COUNT((VARE>=VARF),3)AND(REF(LOW,1)=LLV(LOW,120)),1,0),LOW,'●买进'),COLORFF00FF;

    DRAWTEXT(IF(((COUNT((CLOSE0.6)ANDCOUNT((VARE>VARF),6)AND

    (REF(LOW,5)=LLV(LOW,120))ANDREF((CLOSE>=OPEN),4)ANDREF((CLOSE>OPEN),3)AND

    REF((CLOSE>OPEN),2)ANDREF((OPEN>CLOSE),1)AND(OPEN>REF(CLOSE,1)),1,0),LOW,'●买进

    '),COLOR00FFFF;

    VAR10:=(MA(CLOSE,80)-(MA(CLOSE,10))/(3))*(T1);

    DRAWTEXT(IF((CLOSE(MA(VOL,5))/(240))AND

    (CLOSE>(REF(CLOSE,1))*(1.08))AND(CLOSE<(MA(CLOSE,13))*(1.3)),1,0),LOW,'●抄底

    '),COLOR0000FF;

    C3:=REF(C,1);

    涨停:=IF((C-C3)*100/C3>=(10-0.01*100/C3),1,0);

    STICKLINE(涨停,OPEN,CLOSE,2.8,0),COLORMAGENTA;

    跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);

    STICKLINE(跌停,OPEN,CLOSE,2.8,0),COLORGREEN;

image.png

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。