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

模型改写 [文华财经]

  • 咨询内容:  DIFF:(EMA(CLOSE,p)/EMA(CLOSE,p1)-1)*100;DEA:EMA(DIFF,9);MACD:2*(DIFF-DEA),COLORSTICK; PJ1:=SUM(IF(MACD<0,MACD,0),BARSLAST(MACD>0))/BARSLAST(MACD>0); PJ2:=SUM(IF(MACD>0,MACD,0),BARSLAST(MACD<0))/BARSLAST(MACD<0); 平均MACD:IF(PJ2>0,PJ2,PJ1),LINEDASHDOT, COLORCYAN; PMJ1:=SUM(IF(MACD<0,MACD,0),BARSLAST(MACD>0))/10; PMJ2:=SUM(IF(MACD>0,MACD,0),BARSLAST(MACD<0))/10; 总MACD:IF(MACD>0,PMJ2,PMJ1);红显示:=CROSS(DEA,DIFF);绿显示:=CROSS(DIFF,DEA);
    DRAWNUMBER(红显示,macd,REF(总MACD,1)*10,2),COLORMAGENTA,pxdn30,align2; DRAWNUMBER(绿显示,macd,REF(总MACD,1)*10,2),COLORCYAN,pxup30,align2; STICKLINE(MACD>=0 and MACD>REF(MACD, 1), 0, macd, 0, 0), COLORWHITE; STICKLINE(MACD>=0 and MACD<=REF(MACD, 1), 0, macd, 0, 0),  COLORred; STICKLINE(MACD<0 and MACD<REF(MACD, 1), 0, macd, 0, 0),COLORMAGENTA; STICKLINE(MACD<0 and MACD>=REF(MACD, 1), 0, macd, 0, 0),COLORGREEN; PARTLINE(总MACD>0,总MACD),colorgreen;PARTLINE(总MACD<0,总MACD),colorRED; DRAWNUMBER(BARSTATUS=2 and macd>0,macd*-1,总MACD*10,2),colorred,align0; DRAWNUMBER(BARSTATUS=2 and macd<=0,macd*-1,总MACD*10,2),colorgreen, pxup40,align0; 

     

  • 文华技术人员:

     DIFF:(EMA(CLOSE,P)/EMA(CLOSE,P1)-1)*100;
    DEA:EMA(DIFF,9);
    MACD:2*(DIFF-DEA),COLORSTICK;
    PJ1:=SUM(IF(MACD<0,MACD,0),BARSLAST(MACD>0))/BARSLAST(MACD>0);
    PJ2:=SUM(IF(MACD>0,MACD,0),BARSLAST(MACD<0))/BARSLAST(MACD<0);
    PJMACD:IFELSE(PJ2>0,PJ2,PJ1),COLORCYAN;
    PMJ1:=SUM(IFELSE(MACD<0,MACD,0),BARSLAST(MACD>0))/10;
    PMJ2:=SUM(IFELSE(MACD>0,MACD,0),BARSLAST(MACD<0))/10;
    ZMACD:IFELSE(MACD>0,PMJ2,PMJ1);
    HXS:=CROSS(DEA,DIFF);
    LXS:=CROSS(DIFF,DEA);
    DRAWNUMBER(HXS,MACD,REF(ZMACD,1)*10,2,COLORMAGENTA);
    DRAWNUMBER(LXS,MACD,REF(ZMACD,1)*10,2,COLORCYAN);
    STICKLINE(MACD>=0 AND MACD>REF(MACD, 1), 0, MACD,COLORWHITE, 0);
    STICKLINE(MACD>=0 AND MACD<=REF(MACD, 1), 0, MACD, COLORRED, 0);
    STICKLINE(MACD<0 AND MACD<REF(MACD, 1), 0, MACD,COLORMAGENTA, 0);
    STICKLINE(MACD<0 AND MACD>=REF(MACD, 1), 0, MACD,COLORGREEN, 0);
    PARTLINE(ZMACD>0,ZMACD,COLORGREEN);
    PARTLINE(ZMACD<0,ZMACD,COLORRED);
    DRAWNUMBER(ISLASTBAR AND MACD>0,MACD*-1,ZMACD*10,2,COLORRED);
    DRAWNUMBER(ISLASTBAR AND MACD<=0,MACD*-1,ZMACD*10,2,COLORGREEN);

     

    模型仅供参考

     

  • 文华客服:  系统提示第四行非法的逗号。。。。。。。请问你可以QQ交流吗?

     

  • 网友回复:

    论坛是我们沟通的平台 目前暂无QQ沟通的服务 很抱歉。

     

    您在WH6中使用如下模型

     

     DIFF:(EMA(CLOSE,P)/EMA(CLOSE,P1)-1)*100;
    DEA:EMA(DIFF,9);
    MACD:2*(DIFF-DEA),COLORSTICK;
    PJ1:=SUM(IFELSE(MACD<0,MACD,0),BARSLAST(MACD>0))/BARSLAST(MACD>0);
    PJ2:=SUM(IFELSE(MACD>0,MACD,0),BARSLAST(MACD<0))/BARSLAST(MACD<0);
    PJMACD:IFELSE(PJ2>0,PJ2,PJ1),COLORCYAN;
    PMJ1:=SUM(IFELSE(MACD<0,MACD,0),BARSLAST(MACD>0))/10;
    PMJ2:=SUM(IFELSE(MACD>0,MACD,0),BARSLAST(MACD<0))/10;
    ZMACD:IFELSE(MACD>0,PMJ2,PMJ1);
    HXS:=CROSS(DEA,DIFF);
    LXS:=CROSS(DIFF,DEA);
    DRAWNUMBER(HXS,MACD,REF(ZMACD,1)*10,2,COLORMAGENTA);
    DRAWNUMBER(LXS,MACD,REF(ZMACD,1)*10,2,COLORCYAN);
    STICKLINE(MACD>=0 AND MACD>REF(MACD, 1), 0, MACD,COLORWHITE, 0);
    STICKLINE(MACD>=0 AND MACD<=REF(MACD, 1), 0, MACD, COLORRED, 0);
    STICKLINE(MACD<0 AND MACD<REF(MACD, 1), 0, MACD,COLORMAGENTA, 0);
    STICKLINE(MACD<0 AND MACD>=REF(MACD, 1), 0, MACD,COLORGREEN, 0);
    PARTLINE(ZMACD>0,ZMACD,COLORGREEN);
    PARTLINE(ZMACD<0,ZMACD,COLORRED);
    DRAWNUMBER(ISLASTBAR AND MACD>0,MACD*-1,ZMACD*10,2,COLORRED);
    DRAWNUMBER(ISLASTBAR AND MACD<=0,MACD*-1,ZMACD*10,2,COLORGREEN);

     

    写入参数  如下图

     

     



    此主题相关图片如下:17.jpg

     

  • 网友回复:  请问在这个论坛上如何截图?

 

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

可联系技术人员 QQ: 1145508240  有需要帮忙请点击这里留言!!!进行 有偿 编写!不贵!点击查看价格!


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

相关文章

    没有相关内容