您现在的位置:程序化交易>> 期货公式>> 金字塔等>> 其他期货软件知识>>正文内容

KDJ与K线指标背离,如何表示? [金字塔]

  • 咨询内容:  KDJ与K线指标背离,如何表示?谢谢诶

     

  • 金字塔客服: 何谓背离,你得有个量化的标准啊。要不如何编程?

     

  • 用户回复:  找到了
    优化的kdj底背离

    RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
    K:=SMA(RSV,3,1),COLORWHITE;
    D:=SMA(K,3,1),COLORYELLOW;
    J:3*K-2*D,COLORFF00FF;
    MAJ:=MA(J,2);
    STICKLINE((J>100 AND K>=60),100,J,1,1),COLORYELLOW;{
    回调买}
    STICKLINE(K>92,100,K,1,1),COLORGREEN;{
    高位减}
    STICKLINE((J<=0 AND K<=30),0,J,1,1),COLORYELLOW;{
    黄关注}
    STICKLINE(K<=9,0,K,1,1),COLORRED;{
    红建仓};
    A1:=BARSLAST(REF(CROSS(J,K),1));
    底背:=REF(CLOSE,A1+1)>CLOSE AND J>REF(J,A1+1) AND CROSS(J,K);
    :DRAWLINE(A1=0,D,底背,D,0),COLORRED,POINTDOT;
    DRAWTEXT(
    底背,D,'B'),COLORRED;
    A2:=BARSLAST(REF(CROSS(K,J),1));
    顶背:=REF(CLOSE,A2+1)<CLOSE AND REF(J,A2+1)>J AND CROSS(K,J);
    :DRAWLINE(A2=0,D,顶背,D,0),COLORGREEN,POINTDOT;
    DRAWTEXT(
    顶背,D,'B'),COLORGREEN;
    双金叉:IF(SUM(CROSS(K,D)AND D<23,15)>=2 AND CROSS(K,D)AND C>O,-20,0),COLORGREEN;
    A11:=BARSLAST(REF(CROSS(J,MAJ) AND J<20,1));
    底背1:=REF(CLOSE,A1+1)>CLOSE AND J>REF(J,A1+1) AND CROSS(J,MAJ);
    1:DRAWLINE(A1=0,D,底背,D,0),COLORRED,POINTDOT;
    DRAWTEXT(
    底背1,D,''),COLORGREEN;


     

  • 网友回复:

    学习一下


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容