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

[求助]把通达信副图修改成文华的macd背离指标 [文华财经]

  • 咨询内容:  DIFF:EMA(CLOSE,12)-EMA(CLOSE,26);
    DEA:EMA(DIFF,9);
    MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK2;
    低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
    STICKLINE(低位金叉,0,0.08,6,0),COLORYELLOW;
    DRAWTEXT(低位金叉,0.16,'低位金叉',COLORWHITE;
    JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
    二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
    STICKLINE(二次金叉,0,0.06,6,0),COLORFF00FF;
    DRAWICON(二次金叉,DEA*0.9,1) ;
    DRAWTEXT(二次金叉,0.2,'二次金叉',COLORYELLOW;
    A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
    底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
    STICKLINE(底背离,0,0.03,6,0),COLOR00FF00;
    底背:DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK4;
    DRAWTEXT(底背离,0.12,'底背离',COLORFF00FF;
    A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
    顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
    顶背:DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK4; 
    DRAWTEXT(低位金叉 AND 二次金叉 AND 底背离,0.25,'全项',COLOR0000FF,LINETHICK2

     

     来源:程序化99

  • 文华技术人员:

    参考:、

     

    DIFF:EMA(CLOSE,12)-EMA(CLOSE,26);
    DEA:EMA(DIFF,9);
    MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK2;
    低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
    STICKLINE1(低位金叉,0,0.08,6,0),COLORYELLOW;
    DRAWTEXT(低位金叉,0.16,'低位金叉',COLORWHITE;
    JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
    二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
    STICKLINE1(二次金叉,0,0.06,6,0),COLORFF00FF;
    DRAWICON(二次金叉,DEA*0.9,1) ;
    DRAWTEXT(二次金叉,0.2,'二次金叉',COLORYELLOW;
    A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
    底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
    STICKLINE1(底背离,0,0.03,6,0),COLOR00FF00;
    底背:TRENDLINES(A1=0,DEA,底背离,DEA),COLORRED,LINETHICK4;
    DRAWTEXT(底背离,0.12,'底背离',COLORFF00FF;
    A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
    顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
    顶背:TRENDLINES(A2=0,DEA,顶背离,DEA),COLORGREEN,LINETHICK4;
    DRAWTEXT(低位金叉 AND 二次金叉 AND 底背离,0.25,'全项',COLOR0000FF,LINETHICK2;

     

     来源: WWW.CXH99.COM

  • 文华客服: 指标不对啊,装上显示这个,和通达信不一样,顶背离绿线连接,底背离红线连接,


    文件名:2.png



    下面的是通达信的


    文件名:tdx.png
       

     

  • 网友回复:  不同软件函数机制不同,效果可能存在差异,是正常的
    您可以整理下完整的思路量化表达,我们在文华软件直接为您分析编写

     

  • 网友回复:  http://help.wenhua.com.cn/dispbbs.asp?boardid=14&Id=698736# 可以根据系统的这个顶底背离,  把背离区域用线连接起来
    顶背离区域用绿色连接,底背离用红色线连接起来

 

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

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


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

相关文章

    没有相关内容