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

麻烦老师修改下 [文华财经]

  • 咨询内容:  麻烦老师把绿MACD绿柱改成跟红柱一样的效果,绿柱缩短则显示实体绿柱加长则显示空心
     下载信息  [文件大小:   下载次数: ]文件名:新建文本文档.txt
      

     

     来源:程序化99

  • 文华技术人员:   DIFF:EMA(CLOSE,12)-EMA(CLOSE,26); DEA:EMA(DIFF,9),COLORFFAA00; MACD:=2*(DIFF-DEA);

    DRAWICON(CROSS(DIFF,DEA),0,4),VALIGN0; DRAWICON(CROSSDOWN(DIFF,DEA),0,5),VALIGN2;

    STICKLINE(MACD>=0,MACD,0,4,1),COLORRED; STICKLINE(MACD<0,MACD,0,4,1),COLORGREEN; STICKLINE(MACD<REF(MACD,1) AND MACD>0,0,MACD,4,0 ),COLORRED; STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,4,0 ),COLORGREEN;

    X1:IF(DIFF<0,DIFF,0),COLOR0000FF,LINETHICK2; X2:IF(DIFF<0,0,DIFF),COLORMAGENTA,LINETHICK1; X3:IF(DIFF<DEA,DIFF,DEA),COLOR00FF00,LINETHICK1; X4:IF(DIFF>DEA,DEA,DEA),LINETHICK1,COLORFFBB11; 低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1; DRAWTEXT(低位金叉,DEA*0.86,'低',COLORYELLOW; JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0)); 二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1; STICKLINE(二次金叉,DEA*0.96,DEA*0.76,6,0),COLORFF00FF; //DRAWICON(二次金叉,DEA*1.1,'UY' ; DRAWTEXT(二次金叉,DEA*0.96,'二叉',COLORFF3300; A1:=BARSLAST(REF(CROSS(DIFF,DEA),1)); 底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA); STICKLINE(底背离,DEA*1.09,DEA*0.86,6,0),COLOR00FF00; DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK1; DRAWTEXT(底背离,DEA*1.09,'底',COLORDD22FF; 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,LINETHICK1; DRAWTEXT(顶背离,DEA*1.02,'顶',COLOR00FF00; DRAWLINE3(顶背离,DIFF,0,顶背离,REF(VALUEWHEN( CROSS(DEA,DIFF),DIFF) ,1),SUMBARS(CROSS(DEA,DIFF),2)-1,0 ),COLORGREEN; DRAWLINE3(底背离,DIFF,0,底背离,REF(VALUEWHEN( CROSSDOWN(DEA,DIFF),DIFF) ,1),SUMBARS(CROSSDOWN(DEA,DIFF),2)-1,0 ),COLORRED;
    J:=CROSS(DIFF,DEA),NODRAW; S:=CROSSDOWN(DIFF,DEA),NODRAW;
    前方死叉区域面积:VALUEWHEN(J,REF(SUM(ABS(MACD),BARSLAST(S)+1),1)),NODRAW; 前方金叉区域面积:VALUEWHEN(S,REF(SUM(ABS(MACD),BARSLAST(J)+1),1)),NODRAW; DRAWNUMBER(J,REF(MACD,1),前方死叉区域面积,2,COLORWHITE),VALIGN0; DRAWNUMBER(S,REF(MACD,1),前方金叉区域面积,2,COLORMAGENTA),VALIGN2;

 

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

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

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

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


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

相关文章

    没有相关内容