最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 通达信受金老师的启发博易CCI通达信主图显示

    正文概述    2024-04-14 15:10:08  

    原码奉上:
    {CCI}
    TT:=IF(ISLASTBAR,240/FROMOPEN,1);
    NN:=120;
    HH:=HHV(V*TT,NN);
    LL:=LLV(V,NN);
    最高:=CONST(HH);
    最低:=CONST(LL);
    最高2:=CONST(HHV(H,NN));
    最低2:=CONST(LLV(L,NN));
    PP:=IF((最高2*0.9-(最高2-最低2)*0.5)>CONST(LLV(L,20)),0.9,IF((最高2*0.9-(最高2-最低2)*0.5)>CONST(LLV(L,50)),0.7,0.6)),NODRAW;
    RCC1:=最高2*0.85-(最高2-最低2)*PP;
    最低3:=MIN(RCC1,最低2);
    AAD:=最低3;
    {CCI}
    M:=14;
    N:=20;
    TYP := (HIGH + LOW + CLOSE)/3;
    WCCI:=(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N)),COLORWHITE,LINETHICK2;
    CCI:=(TYP-MA(TYP,M))/(0.015*AVEDEV(TYP,M)),COLOR008000;
    ARRAY:=CCI;
    HIGHBARS:=BARSLAST(NOT(ARRAY>0));
    LOWBARS:=BARSLAST(NOT(ARRAY<0));
    UPCONDITION:=BARSLAST(HIGHBARS>=6 AND SUM(ARRAY>100,5)>0);
    DNCONDITION:=BARSLAST(LOWBARS>=6 AND SUM(ARRAY<-100,5)>0);
    UPTREND:=ARRAY>0 AND UPCONDITION DNTREND:=ARRAY<0 AND UPCONDITION>DNCONDITION;
    TRTREND:=HIGHBARS>=5 AND NOT(UPTREND) OR LOWBARS>=5 AND NOT(DNTREND);
    {蓝色}
    STICKLINE(UPTREND,AAD+CCI/500,AAD,3,0),COLORFF2200;
    STICKLINE(UPTREND,AAD+CCI/500,AAD,2,0),COLORFF4400;
    STICKLINE(UPTREND,AAD+CCI/500,AAD,1,0),COLORFF6600;
    STICKLINE(UPTREND,AAD+CCI/500,AAD,0.1,0),COLORFF8800;
    {绿色}
    STICKLINE(DNTREND,AAD+CCI/500,AAD,3,0),COLOR004400;
    STICKLINE(DNTREND,AAD+CCI/500,AAD,2,0),COLOR008800;
    STICKLINE(DNTREND,AAD+CCI/500,AAD,1,0),COLOR00AA00;
    STICKLINE(DNTREND,AAD+CCI/500,AAD,0.1,0),COLOR00CC00;

    {紫色}
    STICKLINE(TRTREND,AAD+CCI/500,AAD,3,0),COLORFF0055;
    STICKLINE(TRTREND,AAD+CCI/500,AAD,2,0),COLORFF0077;
    STICKLINE(TRTREND,AAD+CCI/500,AAD,1,0),COLORFF0099;
    STICKLINE(TRTREND,AAD+CCI/500,AAD,0.1,0),COLORFF00FF;

    STICKLINE(NOT(UPTREND OR DNTREND OR TRTREND),AAD+CCI/500,AAD,3,0),COLOR003333;
    STICKLINE(NOT(UPTREND OR DNTREND OR TRTREND),AAD+CCI/500,AAD,2,0),COLOR004444;
    STICKLINE(NOT(UPTREND OR DNTREND OR TRTREND),AAD+CCI/500,AAD,2,0),COLOR005555;
    STICKLINE(NOT(UPTREND OR DNTREND OR TRTREND),AAD+CCI/500,AAD,0.1,0),COLOR00FFFF;

     


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信受金老师的启发博易CCI通达信主图显示 加入收藏