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

改编成文华指标 [文华财经]

  • 咨询内容:  麻烦老师改编成文华指标,谢谢

    A:=(3*C+L+O+H)/6;
    GUP0:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)

    +14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)

    +9*REF(A,11)+8*REF(A,12)+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)

    +4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+REF(A,20))/210,COLOR0000FF;

    GUP1:=SLOPE(EMA(CLOSE,2),5)*15+C;

    GUP2:=EMA(GUP1,5);

    GUPA:=EMA(EMA(EMA(EMA(EMA(EMA(EMA(EMA(GUP2,5),5),5),5),5),5),5),5);

    GUPB:=BARSLAST(CROSS(CLOSE,GUPA));

    GUPC:=BARSLAST(CROSS(GUPA,CLOSE));

    STICKLINE(CLOSE<GUPA,REF(CLOSE,GUPC),REF(CLOSE,GUPC),12,0),COLOR00FF00;

    STICKLINE(CLOSE>GUPA AND CLOSE>REF(CLOSE,GUPB),REF(CLOSE,GUPB),GUP0,0.2,0),COLOR0000FF;

    STICKLINE(CLOSE>GUPA AND CLOSE>REF(CLOSE,GUPB),REF(CLOSE,GUPB),REF(CLOSE,GUPB),12,0),COLOR8000FF;

    STICKLINE(CLOSE<GUPA AND CLOSE<REF(CLOSE,GUPC),REF(CLOSE,GUPC),GUP0,0.2,0),COLOR00FF00;

    AA:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,30))/MA(CLOSE,30);

    趋势线:DMA((2*CLOSE+LOW+HIGH)/4,AA),LINETHICK3,COLORRED;

    CC:=(CLOSE/趋势线);

    MA1:=MA(CC*(2*CLOSE+HIGH+LOW)/4,3);

    MAA:=((MA1-趋势线)/趋势线)/3;

    TMP:=MA1-MAA*MA1;

    持币:IF(TMP<=趋势线,趋势线,DRAWNULL),LINETHICK3,COLORGREEN;

    趋势:IF(TMP<=趋势线,TMP,DRAWNULL),LINETHICK2,COLORBLUE;

    MX:=EMA(C,2);

    MXA:=EMA(SLOPE(C,21)*20+C,42);

    建仓:CROSS(MX,MXA),NODRAW;

    清仓:=CROSS(MXA,MX);

    DRAWTEXT(建仓,L-0.1,'',COLORRED;

    DRAWTEXT(清仓,H+0.1,'',COLORGREEN;

    STICKLINE(MX>=MXA,LOW,HIGH,0.0,1),COLORRED;

    STICKLINE(MX>=MXA,CLOSE,OPEN,3,1),COLORRED;

    STICKLINE(MX<MXA,LOW,HIGH,0.0,1),COLORGREEN;

    STICKLINE(MX<MXA,CLOSE,OPEN,3,1),COLORGREEN;

    STICKLINE(建仓,OPEN,CLOSE,2,0),COLORYELLOW;

    STICKLINE(清仓,OPEN,CLOSE,2,0),COLORBLUE;

    CP:=MA(CLOSE,9),COLORCYAN,LINETHICK1;

    JD:=MA(CLOSE,18),COLORMAGENTA;

    DRAWICON(CROSS(CP,JD) AND MX>=MXA,JD-0.1,1);

    DRAWTEXT(CROSS(CP,JD) AND MX>=MXA,JD-0.38,'',COLORYELLOW;

    BL:=VOL>=REF(V,1)*1.91 AND C>REF(C,1)*1.01;

    STICKLINE(FILTER(BL,3),OPEN,CLOSE,1.5,0),COLORYELLOW;

    DRAWTEXT_FIX(1,0,0.05,0,'加:可以加仓来回做差】',COLORYELLOW;

    DRAWTEXT_FIX(1,0,0.1,0,'空:空仓持币】',COLORGREEN;

    DRAWTEXT_FIX(1,0,0.15,0,'多:开始建仓】',COLORMAGENTA;

     

     来源:程序化99

  • 文华技术人员: 文华软件是不支持在指定位置标注的,您可以描述下您加、多、空的标注思路,
    我们看下能否改写。
    参考:
    A:=(3*C+L+O+H)/6;

    GUP0:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)
    +14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)
    +9*REF(A,11)+8*REF(A,12)+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)
    +4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+REF(A,20))/210,COLOR0000FF;
    GUP1:=SLOPE(EMA(CLOSE,2),5)*15+C;
    GUP2:=EMA(GUP1,5);
    GUPA:=EMA(EMA(EMA(EMA(EMA(EMA(EMA(EMA(GUP2,5),5),5),5),5),5),5),5);
    GUPB:=BARSLAST(CROSS(CLOSE,GUPA));
    GUPC:=BARSLAST(CROSS(GUPA,CLOSE));
    STICKLINE(CLOSE<GUPA,REF(CLOSE,GUPC),REF(CLOSE,GUPC),12,0),COLOR00FF00;
    STICKLINE(CLOSE>GUPA AND CLOSE>REF(CLOSE,GUPB),REF(CLOSE,GUPB),GUP0,0.2,0),COLOR0000FF;
    STICKLINE(CLOSE>GUPA AND CLOSE>REF(CLOSE,GUPB),REF(CLOSE,GUPB),REF(CLOSE,GUPB),12,0),COLOR8000FF;
    STICKLINE(CLOSE<GUPA AND CLOSE<REF(CLOSE,GUPC),REF(CLOSE,GUPC),GUP0,0.2,0),COLOR00FF00;
    AA:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,30))/MA(CLOSE,30);
    趋势线:DMA((2*CLOSE+LOW+HIGH)/4,AA),LINETHICK3,COLORRED;
    CC:=(CLOSE/趋势线);
    MA1:=MA(CC*(2*CLOSE+HIGH+LOW)/4,3);
    MAA:=((MA1-趋势线)/趋势线)/3;
    TMP:=MA1-MAA*MA1;
    持币:IF(TMP<=趋势线,趋势线,NULL),LINETHICK3,COLORGREEN;
    趋势:IF(TMP<=趋势线,TMP,NULL),LINETHICK2,COLORBLUE;
    MX:=EMA(C,2);
    MXA:=EMA(SLOPE(C,21)*20+C,42);
    建仓:CROSS(MX,MXA),NODRAW;
    清仓:=CROSS(MXA,MX);
    DRAWTEXT(建仓,L-0.1,'',COLORRED;
    DRAWTEXT(清仓,H+0.1,'',COLORGREEN;
    STICKLINE(MX>=MXA,LOW,HIGH,0.0,1),COLORRED;
    STICKLINE(MX>=MXA,CLOSE,OPEN,3,1),COLORRED;
    STICKLINE(MX<MXA,LOW,HIGH,0.0,1),COLORGREEN;
    STICKLINE(MX<MXA,CLOSE,OPEN,3,1),COLORGREEN;
    STICKLINE(建仓,OPEN,CLOSE,2,0),COLORYELLOW;
    STICKLINE(清仓,OPEN,CLOSE,2,0),COLORBLUE;
    CP:=MA(CLOSE,9),COLORCYAN,LINETHICK1;
    JD:=MA(CLOSE,18),COLORMAGENTA;
    DRAWICON(CROSS(CP,JD) AND MX>=MXA,JD-0.1,1);
    DRAWTEXT(CROSS(CP,JD) AND MX>=MXA,JD-0.38,'',COLORYELLOW;
    BL:=VOL>=REF(V,1)*1.91 AND C>REF(C,1)*1.01;
    STICKLINE(FILTER(BL,3),OPEN,CLOSE,1.5,0),COLORYELLOW;

 

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

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

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

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


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

相关文章

    没有相关内容