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

请求老师帮忙改一下通达信的MACD自动画线指标 [文华财经]

  • 咨询内容: DIFF:EMA(CLOSE,12)-EMA(CLOSE,27); DEA:EMA(DIFF,9); MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK2; 低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.3; 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="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)DIFF AND CROSS(DEA,DIFF); 顶背:DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK4; DRAWTEXT(低位金叉 AND 二次金叉 AND 底背离,0.25,'三全项'),COLOR0000FF,LINETHICK2; A3:=REF(DIFF,M1)=HHV(DIFF,2*M1+1);B1:=FILTER(A3,M1);C1:=BACKSET(B1,M1+1);D1:=FILTER(C1,M1); E1:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);F1:=E1>REF(E1,1); A4:=REF(DIFF,M2)=LLV(DIFF,2*M2+1);B2:=FILTER(A4,M2);C2:=BACKSET(B2,M2+1);D2:=FILTER(C2,M2); E2:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);F2:=E2>REF(E2,1); 压力线:DRAWLINE(D1,DIFF,F1,DIFF,1),COLORGREEN; 支撑线:DRAWLINE(D2,DIFF,F2,DIFF,0),COLORRED; G3:=FILTERX(支撑线>REF(支撑线,1) && DIFF>支撑线 && REF(支撑线,1)=REF(DIFF,1),2); 底抬高:DRAWLINE(D2,DIFF,G3,支撑线,1),COLORYELLOW;

     

  • 文华技术人员: 您的模型源码比较乱,您整理一下

     

  • 文华客服:

    DIFF:EMA(CLOSE,12)-EMA(CLOSE,27);

    DEA:EMA(DIFF,9);

    MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK2;

    低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.3;

    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="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)DIFF AND CROSS(DEA,DIFF);

    顶背:DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK4;

    DRAWTEXT(低位金叉 AND 二次金叉 AND 底背离,0.25,'三全项'),COLOR0000FF,LINETHICK2;

    A3:=REF(DIFF,M1)=HHV(DIFF,2*M1+1);

    B1:=FILTER(A3,M1);

    C1:=BACKSET(B1,M1+1);

    D1:=FILTER(C1,M1);

    E1:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);

    F1:=E1>REF(E1,1);

    A4:=REF(DIFF,M2)=LLV(DIFF,2*M2+1);

    B2:=FILTER(A4,M2);

    C2:=BACKSET(B2,M2+1);

    D2:=FILTER(C2,M2);

    E2:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);

     F2:=E2>REF(E2,1);

    压力线:DRAWLINE(D1,DIFF,F1,DIFF,1),COLORGREEN;

    支撑线:DRAWLINE(D2,DIFF,F2,DIFF,0),COLORRED;

    G3:=FILTERX(支撑线>REF(支撑线,1) && DIFF>支撑线 && REF(支撑线,1)=REF(DIFF,1),2);

     底抬高:DRAWLINE(D2,DIFF,G3,支撑线,1),COLORYELLOW;

     

  • 网友回复: 我都整理过了 怎么发上去还是比较乱啊?

     

  • 网友回复: 现在好了

 

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

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


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

相关文章

    没有相关内容