• 网站首页
  • 股票知识
  • 股票公式
  • 散户炒股
  • 问答百科
  • 缠中说禅
  • 概念股
  • 【股票知识干货】【通达信】最终版本缠论主图指标公式

    发布时间: 2020-04-14 20:43 首页:股票一点通>股票公式>通达信公式> 阅读()

    N:=(1,100,8);
    KK:=(0,2,0);
    TYP := (HIGH + LOW + CLOSE)/3;
    CCI1:=(TYP-MA(TYP,6))/(0.015*AVEDEV(TYP,6));
    CCI2:=(TYP-MA(TYP,10))/(0.015*AVEDEV(TYP,10));
    CCI3:=(TYP-MA(TYP,20))/(0.015*AVEDEV(TYP,20));
    CCI4:=(TYP-MA(TYP,30))/(0.015*AVEDEV(TYP,30));
    CCI5:=(TYP-MA(TYP,60))/(0.015*AVEDEV(TYP,60));
    CCI:=CCI1+CCI2+CCI3+CCI4+CCI5;
    AAAB:=(3*C+H+L+O)/6;
    VVAR1:=(8*AAAB+7*REF(AAAB,1)+6*REF(AAAB,2)+5*REF(AAAB,3)+4*REF(AAAB,4)+3*REF(AAAB,5)+2*REF(AAAB,6)+REF(AAAB,8))/36;
    VVAR6:=(LLV(VVAR1,2)+LLV(VVAR1,4)+LLV(VVAR1,6))/3;
    短线:IF(KK=0, VVAR1, DRAWNULL),COLORWHITE;
    中线:IF(KK=0,VVAR6, DRAWNULL),COLORYELLOW;
    DRAWBAND(短线,RGB(200,10,10),中线,RGB(10,200,10));
    DRAWKLINE(H,O,L,C);
    下跌:IF(KK=0 AND VVAR1=VVAR6,VVAR6, DRAWNULL),COLORGREEN;
    中:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
    上轨:IF(KK=1,中+3*STD(中,10),DRAWNULL),COLOR000088,LINETHICK1;
    IF(KK=1,2*MA(上轨,12)-MA(C,21),DRAWNULL),COLOR666666;
    N1:=(1,100,10);
    N2:=(1,100,10);
    DISP:=(1,3,2);
    K:=IF(PERIOD=5,1,{日}
    IF(PERIOD=6,1,{周}
    IF(PERIOD=7,1,{月}
    IF(PERIOD=8,1,{多分钟}
    IF(PERIOD=9,1,{多日}
    IF(PERIOD=10,1,{季}
    IF(PERIOD=11,2,{年}
    IF(PERIOD=4,1,{60F}
    IF(PERIOD=3,1,{30F}
    IF(PERIOD=2,1,{15F}
    IF(PERIOD=1,1{5F},1{1F})))))))))))/10;
    P1:=PEAK(1,K*N1,1);
    P2:=PEAK(1,K*N1,2);
    WP1:=PEAKBARS(1,K*N1,1);
    WP2:=PEAKBARS(1,K*N1,2);
    T1:=TROUGH(2,K*N2,1);
    T2:=TROUGH(2,K*N2,2);
    WT1:=TROUGHBARS(2,K*N2,1);
    WT2:=TROUGHBARS(2,K*N2,2);
    TJ1:=P1>T1 AND P2>T2 ;
    ZD:=MAX(T1,T2);
    ZG:=MIN(P1,P2);
    LL:=MIN(T1,T2);
    HH:=MAX(P1,P2);
    TJ2:=FILTER(ZG>ZD,2);
    TJ3:=ZG=REF(ZG,BARSLAST(TJ2)) OR ZD=REF(ZD,BARSLAST(TJ2));
    TJ4:=TJ1&&TJ2&&NOT(TJ3);
    TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));
    TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));
    TJ7:=ZG>REF(ZG,REF(BARSLAST(TJ4),1))&&ZDREF(H,1),1,IF(HREF(距前低天,1) AND LLV(L,距前高天+1)REF(HHV(H,距前低天+1),1),1,0);
    高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)=4 OR HHV(缺口判断,距前低天)=1),1,0);
    高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0);
    预判A:=IF((距前高天REF(大值周期,距前高天) AND 小值周期>REF(小值周期,距前低天),-1,0);
    低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);
    高保留XB:=IF(局部高点预选C=1 AND REF(距前低天A,1)=4 OR HHV(缺口判断,距前低天A)=1),1,0);
    高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND H>REF(L,距前低天A+1),1,0);
    预判XA:=IF((距前高天AREF(大值周期,距前高天A) AND 小值周期>REF(小值周期,距前低天A),-1,0);
    低保留XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)>REF(距前低天A,1) AND LLV(L,距前高天A+1)REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);
    高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA,1)=4 OR
    HHV(缺口判断,距前低天YA)=1),1,0);
    高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) AND H>REF(L,距前低天YA+1),1,0);
    预判YXA:=IF((距前高天YAREF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0);
    低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)

    特别声明:文章内容仅供参考,不造成任何投资建议。投资者据此操作,风险自担。

    网站首页-股票知识--股票公式-散户炒股-问答百科--缠中说禅-概念股

    未经本站书面特别授权,请勿转载或建立镜像

    Copyright @ 2020 All Rights Reserved.版权所有 XMl地图
    Baidu
    map