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

[求助]修改指标成文华财经 [文华财经]

  • 咨询内容:  老师,发现帝纳波利点位交易法的一个指标公式(博弈版),请转成文华财经的;如下源码 DDD:DATE,LINETHICK0,COLORWHITE; A1:=IF(D=1, REF(H,BARSLAST(DATE=A_TIME)), IF(D=2, REF(L,BARSLAST(DATE=ATIME)), 0));
    B1:=IF(D=1, REF(L,BARSLAST(DATE=B_TIME)), IF(D=2, REF(H,BARSLAST(DATE=BTIME)), 0));
    C1:=IF(D=1, REF(H,BARSLAST(DATE=C_TIME)), IF(D=2, REF(L,BARSLAST(DATE=CTIME)), 0));

    入场点1:=0.618*(A1-B1)+B1,COLORRED;
    入场点2:=0.5*(A1-B1)+B1,COLORRED;
    入场点3:=0.382*(A1-B1)+B1,COLORRED;

    OP:B1-A1+C1,COLORYELLOW,LINETHICK0;
    COP:0.618*(B1-A1)+C1,COLORYELLOW,LINETHICK0;
    XOP:1.618*(B1-A1)+C1,COLORYELLOW,LINETHICK0;

    PARTLINE(DD=10 AND DATE>= B_TIME AND D=1, 入场点1), COLORRED;
    PARTLINE(DD=10 AND DATE>= B_TIME AND D=1, 入场点2), COLORRED;
    PARTLINE(DD=10 AND DATE>= B_TIME AND D=1, 入场点3), COLORRED;

    PARTLINE(DD=10 AND DATE>= BTIME AND D=2, 入场点1), COLORRED;
    PARTLINE(DD=10 AND DATE>= BTIME AND D=2, 入场点2), COLORRED;
    PARTLINE(DD=10 AND DATE>= BTIME AND D=2, 入场点3), COLORRED;

    DRAWNUMBER(FILTER(DD=10 AND DATE>= B_TIME AND D=1,300),入场点1,0.618,3),ALIGN2;
    DRAWNUMBER(FILTER(DD=10 AND DATE>= B_TIME AND D=1,300),入场点2,0.5,1),ALIGN2;
    DRAWNUMBER(FILTER(DD=10 AND DATE>= B_TIME AND D=1,300),入场点3,0.382,3),ALIGN2;

    DRAWNUMBER(FILTER(DD=10 AND DATE>= BTIME AND D=2,300),入场点1,0.618,3),ALIGN2;
    DRAWNUMBER(FILTER(DD=10 AND DATE>= BTIME AND D=2,300),入场点2,0.5,1),ALIGN2;
    DRAWNUMBER(FILTER(DD=10 AND DATE>= BTIME AND D=2,300),入场点3,0.382,3),ALIGN2;


    PARTLINE(DD=10 AND DATE>= C_TIME AND D=1, OP), COLORYELLOW;
    PARTLINE(DD=10 AND DATE>= C_TIME AND D=1, COP), COLORYELLOW;
    PARTLINE(DD=10 AND DATE>= C_TIME AND D=1, XOP), COLORYELLOW;

    PARTLINE(DD=10 AND DATE>= CTIME AND D=2, OP), COLORYELLOW;
    PARTLINE(DD=10 AND DATE>= CTIME AND D=2, COP), COLORYELLOW;
    PARTLINE(DD=10 AND DATE>= CTIME AND D=2, XOP), COLORYELLOW;
    {PARTLINE(DD=10 AND DATE>= ATIME AND D=2, A1), COLORWHITE;
    PARTLINE(DD=10 AND DATE>= A_TIME AND D=1, A1), COLORWHITE;
    }
    DRAWTEXT(FILTER(DD=10 AND DATE>= C_TIME AND D=1,300),OP,'OP'),ALIGN2;
    DRAWTEXT(FILTER(DD=10 AND DATE>= C_TIME AND D=1,300),COP,'COP'),ALIGN2;
    DRAWTEXT(FILTER(DD=10 AND DATE>= C_TIME AND D=1,300),XOP,'XOP'),ALIGN2;

    DRAWTEXT(FILTER(DD=10 AND DATE>= CTIME AND D=2,300),OP,'OP'),ALIGN2;
    DRAWTEXT(FILTER(DD=10 AND DATE>= CTIME AND D=2,300),COP,'COP'),ALIGN2;
    DRAWTEXT(FILTER(DD=10 AND DATE>= CTIME AND D=2,300),XOP,'XOP'),ALIGN2;

    STICKLINE(FILTER(DD=10 AND DATE>= C_TIME AND D=1,300),L,XOP,0.01,0),COLORGREEN;

    STICKLINE(FILTER(DD=10 AND DATE>= CTIME AND D=2,300),L,XOP,0.01,0),COLORGREEN;

    DRAWTEXT(FILTER(DD=10 AND DATE>= A_TIME AND D=1,300),A1,'A'),ALIGN2;
    DRAWTEXT(FILTER(DD=10 AND DATE>= B_TIME AND D=1,300),B1,'B'),ALIGN2;
    DRAWTEXT(FILTER(DD=10 AND DATE>= C_TIME AND D=1,300),C1,'C'),ALIGN2;
    DRAWTEXT(FILTER(DD=10 AND DATE>= ATIME AND D=2,300),A1,'A'),ALIGN2;
    DRAWTEXT(FILTER(DD=10 AND DATE>= BTIME AND D=2,300),B1,'B'),ALIGN2;
    DRAWTEXT(FILTER(DD=10 AND DATE>= CTIME AND D=2,300),C1,'C'),ALIGN2;

    POLYLINE((DATE=A_TIME OR DATE=B_TIME) AND D=1,IF(DATE=A_TIME, H, L)),COLORGREEN;
    POLYLINE((DATE=B_TIME OR DATE=C_TIME) AND D=1,IF(DATE=B_TIME, L, H)),COLORGREEN;


    POLYLINE((DATE=ATIME OR DATE=BTIME) AND D=2,IF(DATE=ATIME, L, H)),COLORGREEN;
    POLYLINE((DATE=BTIME OR DATE=CTIME) AND D=2,IF(DATE=BTIME, H, L)),COLORGREEN;  

     

     来源:程序化99

  • 文华技术人员:

    前8行是参数,需要您对照其他软件源码进行修改:

     

    D:=1;
    DD:=10;
    ATIME:=180211;
    BTIME:=180212;
    CTIME:=180213;
    AATIME:=180211;
    BBTIME:=180212;
    CCTIME:=180213;
    DDD:=DATE,NODRAW,COLORWHITE;
    A1:=IF(D=1, REF(H,BARSLAST(DATE=ATIME)), IF(D=2, REF(L,BARSLAST(DATE=ATIME)), 0));
    B1:=IF(D=1, REF(L,BARSLAST(DATE=BTIME)), IF(D=2, REF(H,BARSLAST(DATE=BTIME)), 0));
    C1:=IF(D=1, REF(H,BARSLAST(DATE=CTIME)), IF(D=2, REF(L,BARSLAST(DATE=CTIME)), 0));
    入场点1:=0.618*(A1-B1)+B1,COLORRED;
    入场点2:=0.5*(A1-B1)+B1,COLORRED;
    入场点3:=0.382*(A1-B1)+B1,COLORRED;
    OP:B1-A1+C1,COLORYELLOW,NODRAW;
    COP:0.618*(B1-A1)+C1,COLORYELLOW,NODRAW;
    XOP:1.618*(B1-A1)+C1,COLORYELLOW,NODRAW;
    PARTLINE1(DD=10 AND DATE>= BTIME AND D=1, 入场点1), COLORRED;
    PARTLINE1(DD=10 AND DATE>= BTIME AND D=1, 入场点2), COLORRED;
    PARTLINE1(DD=10 AND DATE>= BTIME AND D=1, 入场点3), COLORRED;
    PARTLINE1(DD=10 AND DATE>= BBTIME AND D=2, 入场点1), COLORRED;
    PARTLINE1(DD=10 AND DATE>= BBTIME AND D=2, 入场点2), COLORRED;
    PARTLINE1(DD=10 AND DATE>= BBTIME AND D=2, 入场点3), COLORRED;
    DRAWNUMBER1(FILTER(DD=10 AND DATE>= BTIME AND D=1,300),入场点1,0.618,3),ALIGN2;
    DRAWNUMBER1(FILTER(DD=10 AND DATE>= BTIME AND D=1,300),入场点2,0.5,1),ALIGN2;
    DRAWNUMBER1(FILTER(DD=10 AND DATE>= BTIME AND D=1,300),入场点3,0.382,3),ALIGN2;
    DRAWNUMBER1(FILTER(DD=10 AND DATE>= BBTIME AND D=2,300),入场点1,0.618,3),ALIGN2;
    DRAWNUMBER1(FILTER(DD=10 AND DATE>= BBTIME AND D=2,300),入场点2,0.5,1),ALIGN2;
    DRAWNUMBER1(FILTER(DD=10 AND DATE>= BBTIME AND D=2,300),入场点3,0.382,3),ALIGN2;
    PARTLINE1(DD=10 AND DATE>= CTIME AND D=1, OP), COLORYELLOW;
    PARTLINE1(DD=10 AND DATE>= CTIME AND D=1, COP), COLORYELLOW;
    PARTLINE1(DD=10 AND DATE>= CTIME AND D=1, XOP), COLORYELLOW;
    PARTLINE1(DD=10 AND DATE>= CCTIME AND D=2, OP), COLORYELLOW;
    PARTLINE1(DD=10 AND DATE>= CCTIME AND D=2, COP), COLORYELLOW;
    PARTLINE1(DD=10 AND DATE>= CCTIME AND D=2, XOP), COLORYELLOW;
    DRAWTEXT(FILTER(DD=10 AND DATE>= CTIME AND D=1,300),OP,'P',ALIGN2;
    DRAWTEXT(FILTER(DD=10 AND DATE>= CTIME AND D=1,300),COP,'OP',ALIGN2;
    DRAWTEXT(FILTER(DD=10 AND DATE>= CTIME AND D=1,300),XOP,'OP',ALIGN2;
    DRAWTEXT(FILTER(DD=10 AND DATE>= CCTIME AND D=2,300),OP,'P',ALIGN2;
    DRAWTEXT(FILTER(DD=10 AND DATE>= CCTIME AND D=2,300),COP,'OP',ALIGN2;
    DRAWTEXT(FILTER(DD=10 AND DATE>= CCTIME AND D=2,300),XOP,'OP',ALIGN2;
    STICKLINE(FILTER(DD=10 AND DATE>= CTIME AND D=1,300),L,XOP,0.01,0),COLORGREEN;
    STICKLINE(FILTER(DD=10 AND DATE>= CCTIME AND D=2,300),L,XOP,0.01,0),COLORGREEN;
    DRAWTEXT(FILTER(DD=10 AND DATE>= ATIME AND D=1,300),A1,'',ALIGN2;
    DRAWTEXT(FILTER(DD=10 AND DATE>= BTIME AND D=1,300),B1,'',ALIGN2;
    DRAWTEXT(FILTER(DD=10 AND DATE>= CTIME AND D=1,300),C1,'',ALIGN2;
    DRAWTEXT(FILTER(DD=10 AND DATE>= AATIME AND D=2,300),A1,'',ALIGN2;
    DRAWTEXT(FILTER(DD=10 AND DATE>= BBTIME AND D=2,300),B1,'',ALIGN2;
    DRAWTEXT(FILTER(DD=10 AND DATE>= CCTIME AND D=2,300),C1,'',ALIGN2;
    POLYLINE1((DATE=ATIME OR DATE=BTIME) AND D=1,IF(DATE=ATIME, H, L)),COLORGREEN;
    POLYLINE1((DATE=BTIME OR DATE=CTIME) AND D=1,IF(DATE=BTIME, L, H)),COLORGREEN;
    POLYLINE1((DATE=AATIME OR DATE=BBTIME) AND D=2,IF(DATE=AATIME, L, H)),COLORGREEN;
    POLYLINE1((DATE=BBTIME OR DATE=CCTIME) AND D=2,IF(DATE=BBTIME, H, L)),COLORGREEN;

 

有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友

可联系技术人员 QQ: 511411198  点击这里给我发消息或微信:cxhjy888 进行 有偿 编写!不贵!点击查看价格!


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

相关文章

    没有相关内容