您现在的位置:程序化交易>> 期货公式>> 文华财经>> 文华财经知识>>正文内容

老师麻烦增加横线 [文华财经]

  • 咨询内容:

     //显示当日开盘价决定红绿色填充图阳线红阴线绿色填充
    //A:="HOUR$1$VOL";//1-4小时
    //N1:=BARSLAST(A<>REF(A,1))+1;//1-4小时
    //N1:=BARSLAST(QUARTER<>REF(QUARTER,1))+1;
    //N1:=BARSLAST(WEEKDAY<REF(WEEKDAY,1))+1;
    N1:=BARSLAST(DATE<>REF(DATE,1))+1;
    HD:=REF(HHV(H,N1),N1);
    LD:=REF(LLV(L,N1),N1);
    HD1:=REF(REF(HHV(H,N1),N1),N1);
    LD1:=REF(REF(LLV(L,N1),N1),N1);
    X1:=HD>=HD1 AND LD>=LD1;
    X2:=HD<HD1 AND LD<LD1;
    X3:=NOT(X1||X2);

    XX:BACKSET(REF( REFX(N1=1,1)&&C>VALUEWHEN(N1=1,O),N1),N1),NODRAW;
    YY:BACKSET(REF( REFX(N1=1,1)&&C<VALUEWHEN(N1=1,O),N1),N1),NODRAW;
    STICKLINE1(X3&&YY,VALUEWHEN(X3,HD),VALUEWHEN(X3,LD),4,0),RGB(134,255,165);//绿色
    STICKLINE1(X2&&YY,VALUEWHEN(X2,HD),VALUEWHEN(X2,LD),4,0),RGB(134,255,165);//绿色
    STICKLINE1(X1&&YY,VALUEWHEN(X1,HD),VALUEWHEN(X1,LD),4,0),RGB(134,255,165);//红色

    STICKLINE1(X3&&XX,VALUEWHEN(X3,HD),VALUEWHEN(X3,LD),4,0),RGB(255,202,202);//红色
    STICKLINE1(X2&&XX,VALUEWHEN(X2,HD),VALUEWHEN(X2,LD),4,0),RGB(255,202,202);//红色
    STICKLINE1(X1&&XX,VALUEWHEN(X1,HD),VALUEWHEN(X1,LD),4,0),RGB(255,202,202);//红色

    STICKLINE1(ISLASTBAR&&X3&&YY,HD,LD,30,0),RGB(134,255,165);//颜色填充延伸
    STICKLINE1(ISLASTBAR&&X2&&YY,HD,LD,30,0),RGB(134,255,165);//颜色填充延伸
    STICKLINE1(ISLASTBAR&&X1&&YY,HD,LD,30,0),RGB(134,255,165);//颜色填充延伸

    STICKLINE1(ISLASTBAR&&X3&&XX,HD,LD,30,0),RGB(255,202,202);//颜色填充延伸
    STICKLINE1(ISLASTBAR&&X2&&XX,HD,LD,30,0),RGB(255,202,202);//颜色填充延伸
    STICKLINE1(ISLASTBAR&&X1&&XX,HD,LD,30,0),RGB(255,202,202);//颜色填充延伸
    DRAWKLINE1(H,O,L,C);//K线显示

     

    老师麻烦把指标中的填充高低处用横线显示,红显示红色线,绿显示绿色线谢谢老师!

     

     来源:程序化99

  • 文华技术人员:  参考;
    //显示当日开盘价决定红绿色填充图阳线红阴线绿色填充 //A:="HOUR$1$VOL";//1-4小时 //N1:=BARSLAST(A<>REF(A,1))+1;//1-4小时 //N1:=BARSLAST(QUARTER<>REF(QUARTER,1))+1; //N1:=BARSLAST(WEEKDAY<REF(WEEKDAY,1))+1; N1:=BARSLAST(DATE<>REF(DATE,1))+1; HD:=REF(HHV(H,N1),N1); LD:=REF(LLV(L,N1),N1); HD1:=REF(REF(HHV(H,N1),N1),N1); LD1:=REF(REF(LLV(L,N1),N1),N1); X1:=HD>=HD1 AND LD>=LD1; X2:=HD<HD1 AND LD<LD1; X3:=NOT(X1||X2);
    XX:BACKSET(REF( REFX(N1=1,1)&&C>VALUEWHEN(N1=1,O),N1),N1),NODRAW; YY:BACKSET(REF( REFX(N1=1,1)&&C<VALUEWHEN(N1=1,O),N1),N1),NODRAW;
    DRAWSL(X3&&YY,VALUEWHEN(X3,HD),0,1,0,RGB(134,255,165)); DRAWSL(X3&&YY,VALUEWHEN(X3,LD),0,1,0,RGB(134,255,165));
    DRAWSL(X2&&YY,VALUEWHEN(X2,HD),0,1,0,RGB(134,255,165)); DRAWSL(X2&&YY,VALUEWHEN(X2,LD),0,1,0,RGB(134,255,165));
    DRAWSL(X1&&YY,VALUEWHEN(X1,HD),0,1,0,RGB(134,255,165)); DRAWSL(X1&&YY,VALUEWHEN(X1,LD),0,1,0,RGB(134,255,165));
    DRAWSL(X3&&XX,VALUEWHEN(X3,HD),0,1,0,RGB(255,202,202)); DRAWSL(X3&&XX,VALUEWHEN(X3,LD),0,1,0,RGB(255,202,202));
    DRAWSL(X2&&XX,VALUEWHEN(X2,HD),0,1,0,RGB(255,202,202)); DRAWSL(X2&&XX,VALUEWHEN(X2,LD),0,1,0,RGB(255,202,202));
    DRAWSL(X1&&XX,VALUEWHEN(X1,HD),0,1,0,RGB(255,202,202)); DRAWSL(X1&&XX,VALUEWHEN(X1,LD),0,1,0,RGB(255,202,202));
    STICKLINE1(ISLASTBAR&&X3&&YY,HD,LD,30,0),RGB(134,255,165);//颜色填充延伸 STICKLINE1(ISLASTBAR&&X2&&YY,HD,LD,30,0),RGB(134,255,165);//颜色填充延伸 STICKLINE1(ISLASTBAR&&X1&&YY,HD,LD,30,0),RGB(134,255,165);//颜色填充延伸
    DRAWSL(ISLASTBAR&&X3&&YY,HD,0,30,0,RGB(134,255,165)); DRAWSL(ISLASTBAR&&X3&&YY,LD,0,30,0,RGB(134,255,165));
    DRAWSL(ISLASTBAR&&X2&&YY,HD,0,30,0,RGB(134,255,165)); DRAWSL(ISLASTBAR&&X2&&YY,LD,0,30,0,RGB(134,255,165));
    DRAWSL(ISLASTBAR&&X1&&YY,HD,0,30,0,RGB(134,255,165)); DRAWSL(ISLASTBAR&&X1&&YY,LD,0,30,0,RGB(134,255,165));
    DRAWSL(ISLASTBAR&&X3&&XX,HD,0,30,0,RGB(255,202,202)); DRAWSL(ISLASTBAR&&X3&&XX,LD,0,30,0,RGB(255,202,202));
    DRAWSL(ISLASTBAR&&X1&&XX,HD,0,30,0,RGB(255,202,202)); DRAWSL(ISLASTBAR&&X1&&XX,LD,0,30,0,RGB(255,202,202));
    DRAWSL(ISLASTBAR&&X2&&XX,HD,0,30,0,RGB(255,202,202)); DRAWSL(ISLASTBAR&&X2&&XX,LD,0,30,0,RGB(255,202,202));

    DRAWKLINE1(H,O,L,C);//K线显示

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信号:cxh99cxh99  进行 有偿收费 编写!

怎么收费,代编流程等详情请点击阅读!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)


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

相关文章

    没有相关内容