最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 将乘风老师的顺势而为改为TDX的

    正文概述    2024-04-14 08:36:37  

    九毛八公式指标

    公式模块:

    请将乘风老师的顺势而为改为TDX的,谢谢了。
    源码如下:

    DRAWGBK(C=C,COLORRGB(130,130,130),COLORRGB(30,30,30),1);
    LC := REF(CLOSE,1);
    rsi1:=SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*400-200;
    FILLRGN(rsi1>-60,rsi1,-60),COLOR6699cc;
    FILLRGN(rsi1<-60,rsi1,-60),COLORGRAY;
    RSI:SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*100,LINETHICK0;
    //////////
    DI := (EMA(CLOSE,12) - EMA(CLOSE,26))*100;
    DE := EMA(DI,9);
    macd := 2*(DI-DE);
    ////////////
    RSV:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*400-200;
    K1:=SMA(RSV,3,1),COLORMAGENTA,LINETHICK2;
    D1:=SMA(K1,3,1),COLORGREEN,LINETHICK0;
    J1:=3*K1-2*D1,COLORYELLOW,LINETHICK2;
    FILLRGN(j1<k1,j1,k1),ColorFF0000;
    FILLRGN(j1>k1,j1,k1),COLORMAGENTA;
    FILLRGN(k1>d1,d1,k1),COLORYELLOW;
    FILLRGN(k1<d1,d1,k1),COLORCYAN;
    ///////////
    {红柱}
    STICKLINE(macd>0 and macd>ref(macd,1),macd,0,3,0),COLOR0000AA;
    STICKLINE(macd>0 and macd>ref(macd,1),macd,0,2.7,0),COLOR0000BB;
    STICKLINE(macd>0 and macd>ref(macd,1),macd,0,2.3,0),COLOR0000CC;
    STICKLINE(macd>0 and macd>ref(macd,1),macd,0,2,0),COLOR0000CC;
    STICKLINE(macd>0 and macd>ref(macd,1),macd,0,1.6,0),COLOR0000DD;
    STICKLINE(macd>0 and macd>ref(macd,1),macd,0,1.2,0),COLOR0000EE;
    STICKLINE(macd>0 and macd>ref(macd,1),macd,0,0.8,0),COLOR0000FF;
    STICKLINE(macd>0 and macd>ref(macd,1),macd,0,0.5,0),COLORRED;
    {黄柱}
    STICKLINE(macd>0 and macd<ref(macd,1),macd,0,3,0),color0090FF;
    STICKLINE(macd>0 and macd<ref(macd,1),macd,0,2.7,0),color009FFF;
    STICKLINE(macd>0 and macd<ref(macd,1),macd,0,2.3,0),color00a6FF;
    STICKLINE(macd>0 and macd<ref(macd,1),macd,0,2,0),color00b5FF;
    STICKLINE(macd>0 and macd<ref(macd,1),macd,0,1.6,0),color00c4FF;;
    STICKLINE(macd>0 and macd<ref(macd,1),macd,0,1.2,0),Color00d3ff;
    STICKLINE(macd>0 and macd<ref(macd,1),macd,0,0.8,0),color00e2FF;
    STICKLINE(macd>0 and macd<ref(macd,1),macd,0,0.5,0),color00FFFF;
    {蓝柱}
    STICKLINE(macd<0 and macd<ref(macd,1),macd,0,3,0),COLORFF0000;
    STICKLINE(macd<0 and macd<ref(macd,1),macd,0,2.7,0),COLORFF3300;
    STICKLINE(macd<0 and macd<ref(macd,1),macd,0,2.3,0),COLORFF5500;
    STICKLINE(macd<0 and macd<ref(macd,1),macd,0,2,0),COLORFF7700;
    STICKLINE(macd<0 and macd<ref(macd,1),macd,0,1.6,0),COLORFF9900;
    STICKLINE(macd<0 and macd<ref(macd,1),macd,0,1.2,0),COLORFFBB00;
    STICKLINE(macd<0 and macd<ref(macd,1),macd,0,0.8,0),COLORFFDD00;
    STICKLINE(macd<0 and macd<ref(macd,1),macd,0,0.5,0),COLORFFFF00;
    {粉柱}
    STICKLINE(macd<0 and macd>ref(macd,1),macd,0,3,0),ColorFF00a9;
    STICKLINE(macd<0 and macd>ref(macd,1),macd,0,2.7,0),ColorFF00a1;
    STICKLINE(macd<0 and macd>ref(macd,1),macd,0,2.3,0),ColorFF00aa;
    STICKLINE(macd<0 and macd>ref(macd,1),macd,0,2,0),ColorFF00bb;
    STICKLINE(macd<0 and macd>ref(macd,1),macd,0,1.6,0),ColorFF00cc;
    STICKLINE(macd<0 and macd>ref(macd,1),macd,0,1.2,0),ColorFF00dd;
    STICKLINE(macd<0 and macd>ref(macd,1),macd,0,0.8,0),ColorFF00ee;
    STICKLINE(macd<0 and macd>ref(macd,1),macd,0,0.5,0),ColorFF00ff;
    ///////////
    PARTLINE(di>=de or di<de,di),COLORbb,LINETHICK2;
    PARTLINE(di>=de or di<de,de),COLORWHITE,LINETHICK1;
    DIFF : (EMA(CLOSE,12) - EMA(CLOSE,26)),COLORbb,LINETHICK0;
    DEA : EMA(DIFF,9),COLORWHITE,LINETHICK0;
    ///////////
    RSV1:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
    K:SMA(RSV1,3,1),Color330700,LINETHICK0;
    D:SMA(K,3,1),COLORCYAN,LINETHICK0;
    J:3*K-2*D,COLORMAGENTA,LINETHICK0;
    //////////
    TYP:=(HIGH+LOW+CLOSE)/3;
    cci:(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),LINETHICK2,COLORGREEN;
    //////////
    DRAWICON(cross(k1,d1),d1,12),ALIGN0;
    DRAWICON(cross(d1,k1),d1,11),ALIGN0;

    200,COLORGREEN,LINEDOT;
    150,COLORWHITE,POINTDOT;
    100,COLORWHITE,POINTDOT;
    0,COLORGRAY,LINETHICK2;
    -100,COLORWHITE,POINTDOT;
    -150,COLORWHITE,POINTDOT;
    -200,COLORRED,LINEDOT;
    DRAWTEXT(BARPOS=SYSPARAM(2),1,' /n乘风操盘副图之一:顺势而为(kdj+MACD+CCI+RSI).'),ALIGN4,COLORYELLOW;
    ==============

    {DRAWGBK(C=C,COLORRGB(130,130,130),COLORRGB(30,30,30),1);}
    LC := REF(CLOSE,1);
    RSI1:=SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*400-200;
    IF(RSI1>-60,RSI1,-60),COLOR6699CC;
    IF(RSI1<-60,RSI1,-60),COLORGRAY;
    RSI:SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*100,LINETHICK0;
    DI:= (EMA(CLOSE,12) - EMA(CLOSE,26))*100;
    DE:= EMA(DI,9);
    MACD:= 2*(DI-DE);
    RSV:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*400-200;
    K1:=SMA(RSV,3,1),COLORMAGENTA,LINETHICK2;
    D1:=SMA(K1,3,1),COLORGREEN,LINETHICK0;
    J1:=3*K1-2*D1,COLORYELLOW,LINETHICK2;
    {IF(J1<K1,J1,K1),COLORFF0000;
    IF(J1>K1,J1,K1),COLORMAGENTA;
    IF(K1>D1,D1,K1),COLORYELLOW;
    IF(K1<D1,D1,K1),COLORCYAN;}
    {红柱}
    STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,3,0),COLOR0000AA;
    STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,2.7,0),COLOR0000BB;
    STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,2.3,0),COLOR0000CC;
    STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,2,0),COLOR0000CC;
    STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,1.6,0),COLOR0000DD;
    STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,1.2,0),COLOR0000EE;
    STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,0.8,0),COLOR0000FF;
    STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,0.5,0),COLORRED;
    {黄柱}
    STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,3,0),COLOR0090FF;
    STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,2.7,0),COLOR009FFF;
    STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,2.3,0),COLOR00A6FF;
    STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,2,0),COLOR00B5FF;
    STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,1.6,0),COLOR00C4FF;
    STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,1.2,0),COLOR00D3FF;
    STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,0.8,0),COLOR00E2FF;
    STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,0.5,0),COLOR00FFFF;
    {蓝柱}
    STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,3,0),COLORFF0000;
    STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,2.7,0),COLORFF3300;
    STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,2.3,0),COLORFF5500;
    STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,2,0),COLORFF7700;
    STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,1.6,0),COLORFF9900;
    STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,1.2,0),COLORFFBB00;
    STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,0.8,0),COLORFFDD00;
    STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,0.5,0),COLORFFFF00;
    {粉柱}
    STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,3,0),COLORFF00A9;
    STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,2.7,0),COLORFF00A1;
    STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,2.3,0),COLORFF00AA;
    STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,2,0),COLORFF00BB;
    STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,1.6,0),COLORFF00CC;
    STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,1.2,0),COLORFF00DD;
    STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,0.8,0),COLORFF00EE;
    STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,0.5,0),COLORFF00FF;
    {IF(DI>=DE OR DI<DE,DI,DRAWNULL),COLORBB,LINETHICK2;
    IF(DI>=DE OR DI<DE,DE,DRAWNULL),COLORWHITE,LINETHICK1;
    DIFF: (EMA(CLOSE,12) - EMA(CLOSE,26)),COLORBB,LINETHICK0;
    DEA: EMA(DIFF,9),COLORWHITE,LINETHICK0;}
    {RSV1:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
    K:SMA(RSV1,3,1),COLOR330700,LINETHICK0;
    D:SMA(K,3,1),COLORCYAN,LINETHICK0;
    J:3*K-2*D,COLORMAGENTA,LINETHICK0;
    TYP:=(HIGH+LOW+CLOSE)/3;
    CCI:(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),LINETHICK2,COLORGREEN;}

    DRAWICON(CROSS(K1,D1),D1,12);
    DRAWICON(CROSS(D1,K1),D1,11);

    200,COLORGREEN,POINTDOT;
    150,COLORWHITE,POINTDOT;
    100,COLORWHITE,POINTDOT;
    0,COLORGRAY,LINETHICK2;
    -100,COLORWHITE,POINTDOT;
    -150,COLORWHITE,POINTDOT;
    -200,COLORRED,POINTDOT;
    DRAWTEXT(CURRBARSCOUNT=80,110,'乘风操盘副图之一:顺势而为(kdJ+MACD+CCI+RSI)'),COLORYELLOW;


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 将乘风老师的顺势而为改为TDX的 加入收藏