通达信公式趋势波段买卖主图

    MA5:MA(C,5);

    MA10:MA(C,10);

    MA22:MA(C,22);

    A3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;

    A4:=SMA(A3,3,1);

    A5:=SMA(A4,3,1);

    A6:=3*A4-2*A5;

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

    A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);

    买:=LLV(A8,2)=LLV(A8,7)ANDCOUNT(A8<0,2)ANDCROSS(A8,MA(A8,2));

    DRAWTEXT(FILTER(买=1,7),LOW-0.15,'↖买进'),COLORYELLOW;

    STICKLINE(买,OPEN,CLOSE,2.5,0),COLORYELLOW;

    VARC:=SMA(MAX(C-REF(C,1),0),6,1)/SMA(ABS(C-REF(C,1)),6,1)*100;

    DRAWTEXT(CROSS(84,VARC),H*1.01,'—卖出'),COLORYELLOW;

    均衡:=IF(YEAR<=2017,IF(YEAR<2017,EMA(EMA(CLOSE,5),5),IF(YEAR=2017AND

    MONTH<10,EMA(EMA(CLOSE,5),5),1000)),1000);

    中轨:=HHV(MA(HIGH,13),13);

    趋势:=LLV(MA(HIGH,13),1);

    VARA:=(CLOSE-REF(OPEN,29))/REF(OPEN,29)*100;

    VARB:=EMA(0.667*REF(VARA,1)+0.333*VARA,5);

    VARC:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*10

    0;

    VAR1:=(HIGH+LOW+OPEN+2*CLOSE)/5;

    VAR2:=REF(VAR1,1);

    VAR3:=SMA(MAX(VAR1-VAR2,0),10,1)/SMA(ABS(VAR1-VAR2),10,1)*100;

    VAR4:=(IF(COUNT(VAR3<20,5)>=1ANDCOUNT(VAR1=LLV(VAR1,10),10)>=1AND

    CLOSE>=OPEN*1.038ANDVOL>MA(VOL,5)*1.2,1,0));

    VAR5:=(均衡>REF(均衡,1)AND中轨<REF(中轨,1)ANDCLOSE>REF(CLOSE,1));

    趋势向上:=IF(MA(CLOSE,1)>MA(CLOSE,2)ANDMA(CLOSE,2)>MA(CLOSE,3),1,0);

    出击A:=IF(VAR5AND趋势向上,100,0);

image.png

    通达信公式趋势线主图

    DRAWBAND(MA(CLOSE,60),RGB(55,0,0),MA(CLOSE,120),RGB(0,91,0));

    DRAWBAND(MA(CLOSE,10),RGB(200,0,0),MA(CLOSE,20),RGB(0,0,255));

    DRAWKLINE(H,O,L,C);

    STICKLINE(C>1.095*REF(C,1),C,O,2,0),COLORYELLOW;

    STICKLINE(C<0.905*REF(C,1),C,O,2,0),COLORWHITE;

    MA1:MA(CLOSE,5),COLORYELLOW;

    MA2:MA(CLOSE,10),COLORMAGENTA;

    MA3:MA(CLOSE,20),COLORBROWN;

    MA4:MA(CLOSE,60),COLORGREEN;

    MA5:MA(CLOSE,121),COLORLIGRAY;

    MA6:MA(CLOSE,119),COLORBLUE;

    VAR5:EMA(C,5);

    VAR10:EMA(C,10);

    VAR34:EMA(C,34);

    VAR55:EMA(C,55);

    DRAWBAND(VAR5,RGB(247,0,0),VAR10,RGB(8,135,255));

    DRAWBAND(VAR34,RGB(252,0,252),VAR55,RGB(20,135,10));

    HH:=LLV(L,7)*1.13-0.03;

    STICKLINE(H>=HH,H,H*1.005,1,0),COLOR00FFFF;

    TT2:=DMA((((HIGH+LOW)+(CLOSE*2))/4.15),0.9);

    TT1:=REF(EMA(TT2,3),1);

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

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

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

    J:=3*K-2*D;

    LC:=REF(CLOSE,1);

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

    FF:=EMA(CLOSE,3);

    AA1:=AMOUNT/VOL;

    BB1:=L1.2;

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

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

    FF1:=BB1ANDCC1ANDDD1ANDEE1;

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

    P1:=IF(C<REF(O,1)ANDF<0,1,0);

    P2:=IF(C<REF(O,2)ANDF<0,1,0);

    TT3:=P1=0ANDREF(P1,1)=1ANDP2=0ANDREF(P2,1)=1;

    TT4:=P1=1ANDREF(P1,1)=0ANDP2=1ANDREF(P2,1)=0;

    STICKLINE(TT3,OPEN,CLOSE,3,0),COLORFF00FF;

    日跌:L*0.989,NODRAW,COLORFF00FF;

    今小昨:=IF(C<REF(O,1)ANDF<0,1,0);

    P11:=今小昨;

    今小前:=IF(C<REF(O,2)ANDF<0,1,0);

    P22:=今小前;

    DL:=P11=1ANDREF(P11,1)=0ANDP22=1ANDREF(P22,1)=0;

    STICKLINE(DL,O,C,0.1,0),COLORAAAAAA;

    BB:=MAX(C,O)-(REF(MAX(C,O),2)-MAX(C,O))/2;

    买点:=(H-(REF(H,2)-H)/2);

    AA:MAX(BB,买点),NODRAW,COLORFF00FF;

    STICKLINE(C<OANDF<-3ANDF>-5,C+(O-C)/3,C+(O-C)/3,2.5,0),COLORRED;

    STICKLINE(C<OANDF<-3ANDF>-5,C+2*(O-C)/3,C+2*(O-C)/3,2.5,0),COLORRED;

    STICKLINE(C<OANDF<=-5ANDF>-7,C+(O-C)/2,C+(O-C)/2,2.5,0),COLORYELLOW;

    STICKLINE(C<OANDF<=-7ANDF>-10,C+2*(O-C)/3,C+(O-C)/3,2.5,1),COLORYELLOW;

    STICKLINE(C<OANDF<=-9.9,O,C,2.5,0),COLOR00FF00;

    STICKLINE(C>OANDF>2.9ANDF<5,O+(C-O)/3,O+(C-O)/3,2.5,0),COLORYELLOW;

    STICKLINE(C>OANDF>2.9ANDF<5,O+2*(C-O)/3,O+2*(C-O)/3,2.5,0),COLORYELLOW;

    STICKLINE(C>OANDF>=5ANDF<7,O+(C-O)/2,O+(C-O)/2,2.5,0),COLORYELLOW;

    STICKLINE(C>OANDF>=7,O+2*(C-O)/3,O+(C-O)/3,2.5,1),COLORYELLOW;

   

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