股资源-股票学习站-学炒股-股票课程-炒股教程-分析选股指标-入门基础知识

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
    上一主题 下一主题

    [通达信] 「指标」通达信MACD主图简版


        [-----复制链接-----]

    22万

    主题

    22万

    帖子

    14

    精华

    积分
    11040
    楼主
    2024-2-18 18:12:24
    【资料名称】:通达信MACD主图简版介绍
    【资料描述】:

    通达信MACD主图简版

    说明:此指标在日线时引用的周MACD、在分钟线时引用日MACD数据用未来函数编写画方框,其它均无未来函数!!


    此主图需引用ZDIF指标,ZDIF指标为完全加密无时限。


     


    {MACD主图简版}
    DRAWGBK(C>0,RGB(50,60,50),RGB(50,50,100),0,' ',0);
    ZDIF:ZDIF.ZDIF,COLORC050FF,NODRAW;
    ZDEA:ZDIF.ZDEA,COLORAAA000,NODRAW;
    ZMACD:=(ZDIF-ZDEA)*1.5;
    MA5:MA(C,5),COLORFFFFFF,NODRAW;
    MA10:MA(C,10),COLOR00FFFF,NODRAW;
    MACD试盘:IF((ZDEA/REF(ZDEA,1)-1)*1000<-10 AND ZDIF>ZDEA,1,0),COLORFF00FF,NODRAW;
    MDSMACD:=BARSLASTCOUNT(IF(PERIOD>4,MACD.DIF#WEEK,MACD.DIF#DAY)>IF(PERIOD>4,MACD.DEA#WEEK,MACD.DEA#DAY));
    GYSMACD:=BACKSET((MDSMACD>1)*MDSMACD,MDSMACD)*MDSMACD;
    SDMACD:=GYSMACD=1;
    WDMACD:=FILTERX(GYSMACD>0,GYSMACD);
    MDHMACD:=IF(GYSMACD>0,HHV(H,GYSMACD)*IF(PERIOD>4,1.025,1.011),DRAWNULL);
    MDLMACD:=IF(GYSMACD>0,LLV(L,GYSMACD)*IF(PERIOD>4,0.975,0.985),DRAWNULL);
    FXSMACD:=BARSNEXT(WDMACD);
    HHMACD:=DRAWLINE(SDMACD,REFX(MDHMACD,FXSMACD),WDMACD,MDHMACD,0);
    LLMACD:=DRAWLINE(SDMACD,REFX(MDLMACD,FXSMACD),WDMACD,MDLMACD,0);

    MDSMACDL:=BARSLASTCOUNT(IF(PERIOD>4,MACD.DIF#WEEK,MACD.DIF#DAY)<IF(PERIOD>4,MACD.DEA#WEEK,MACD.DEA#DAY));
    GYSMACDL:=BACKSET((MDSMACDL>1)*MDSMACDL,MDSMACDL)*MDSMACDL;
    SDMACDL:=GYSMACDL=1;
    WDMACDL:=FILTERX(GYSMACDL>0,GYSMACDL);
    MDHMACDL:=IF(GYSMACDL>0,HHV(HHV(H,10),GYSMACDL),DRAWNULL);
    MDLMACDL:=IF(GYSMACDL>0,LLV(LLV(L,10),GYSMACDL),DRAWNULL);
    FXSMACDL:=BARSNEXT(WDMACDL);
    HHMACDL:=DRAWLINE(SDMACDL,REFX(MDHMACDL,FXSMACDL),WDMACDL,MDHMACDL,0);
    LLMACDL:=DRAWLINE(SDMACDL,REFX(MDLMACDL,FXSMACDL),WDMACDL,MDLMACDL,0);
    HLMACDX:=IF(GYSMACD>0,LLMACD*1.015,HHMACDL*0.98);

    DRAWBAND(HHMACD,RGB(128,108,128),LLMACD,DRAWNULL);
    STICKLINE(IF(PERIOD>4,MACD.DEA#WEEK,MACD.DEA#DAY)>0,IF(GYSMACD>0,LLMACD*0.995,HHMACDL*0.995),IF(GYSMACD>0,LLMACD*0.985,HHMACDL*0.985),2,1),COLOR00FFFF;

    DRAWBAND(ZDIF,RGB(100,30,30),ZDEA,RGB(0,155,88));
    DRAWBAND(IF(MACD.DEA>=0,ZDIF,DRAWNULL),RGB(120,60,150),IF(MACD.DEA>=0,ZDEA,DRAWNULL),RGB(0,108,108));


    STICKLINE(C>=O,H,L,0,0),COLOR0000FF;
    STICKLINE(C<O,H,L,0,0),COLORFFF000;
    STICKLINE(C>=O,C,O,3.2,1),COLOR0000FF;
    STICKLINE(C<O,C,O,3.2,1),COLORFFF000;


    STICKLINE(EMA((C+O)/2,3)>=EMA((C+O)/2,6) AND EMA((C+O)/2,6)<EMA((C+O)/2,12),C,O,3.2,0),COLORBB33BB;
    STICKLINE(EMA((C+O)/2,3)>=EMA((C+O)/2,6) AND EMA((C+O)/2,6)<EMA((C+O)/2,12),C,O,1.5,0),COLORCC33CC;
    STICKLINE(EMA((C+O)/2,3)>=EMA((C+O)/2,6) AND EMA((C+O)/2,6)<EMA((C+O)/2,12),C,O,0.5,0),COLORDD33DD;
    STICKLINE(EMA((C+O)/2,3)>=EMA((C+O)/2,6) AND EMA((C+O)/2,6)<EMA((C+O)/2,12) AND C<O,C,(C+O)/2,3.2,0),COLOR998000;
    STICKLINE(EMA((C+O)/2,3)>=EMA((C+O)/2,6) AND EMA((C+O)/2,6)<EMA((C+O)/2,12) AND C<O,C,(C+O)/2,1.5,0),COLORAA9000;
    STICKLINE(EMA((C+O)/2,3)>=EMA((C+O)/2,6) AND EMA((C+O)/2,6)<EMA((C+O)/2,12) AND C<O,C,(C+O)/2,0.5,0),COLORBBA000;

    STICKLINE(EMA((C+O)/2,3)<EMA((C+O)/2,6) AND EMA((C+O)/2,6)>=EMA((C+O)/2,12),C,O,3.2,0),COLORC0C0C0;
    STICKLINE(EMA((C+O)/2,3)<EMA((C+O)/2,6) AND EMA((C+O)/2,6)>=EMA((C+O)/2,12),C,O,1.5,0),COLORD0D0D0;
    STICKLINE(EMA((C+O)/2,3)<EMA((C+O)/2,6) AND EMA((C+O)/2,6)>=EMA((C+O)/2,12),C,O,0.5,0),COLORE0E0E0;
    STICKLINE(EMA((C+O)/2,3)<EMA((C+O)/2,6) AND EMA((C+O)/2,6)>=EMA((C+O)/2,12) AND C<O,C,(C+O)/2,3.2,0),COLORDDD000;
    STICKLINE(EMA((C+O)/2,3)<EMA((C+O)/2,6) AND EMA((C+O)/2,6)>=EMA((C+O)/2,12) AND C<O,C,(C+O)/2,1.5,0),COLOREEE000;
    STICKLINE(EMA((C+O)/2,3)<EMA((C+O)/2,6) AND EMA((C+O)/2,6)>=EMA((C+O)/2,12) AND C<O,C,(C+O)/2,0.5,0),COLORFFF000;

    STICKLINE(EMA((C+O)/2,3)>=EMA((C+O)/2,6) AND EMA((C+O)/2,6)>=EMA((C+O)/2,12),C,O,3.2,0),COLOR0000DD;
    STICKLINE(EMA((C+O)/2,3)>=EMA((C+O)/2,6) AND EMA((C+O)/2,6)>=EMA((C+O)/2,12),C,O,1.5,0),COLOR0000EE;
    STICKLINE(EMA((C+O)/2,3)>=EMA((C+O)/2,6) AND EMA((C+O)/2,6)>=EMA((C+O)/2,12),C,O,0.5,0),COLOR0000FF;
    STICKLINE(EMA((C+O)/2,3)>=EMA((C+O)/2,6) AND EMA((C+O)/2,6)>=EMA((C+O)/2,12) AND C<O,C,(C+O)/2,3.2,0),COLOR009900;
    STICKLINE(EMA((C+O)/2,3)>=EMA((C+O)/2,6) AND EMA((C+O)/2,6)>=EMA((C+O)/2,12) AND C<O,C,(C+O)/2,1.5,0),COLOR00AA00;
    STICKLINE(EMA((C+O)/2,3)>=EMA((C+O)/2,6) AND EMA((C+O)/2,6)>=EMA((C+O)/2,12) AND C<O,C,(C+O)/2,0.5,0),COLOR00BB00;

    STICKLINE(EMA((C+O)/2,3)<EMA((C+O)/2,6) AND EMA((C+O)/2,6)>=EMA((C+O)/2,12) AND EMA((C+O)/2,12)>=REF(EMA((C+O)/2,12),1) AND C>O,C,O,3.2,0),COLOR00DDDD;
    STICKLINE(EMA((C+O)/2,3)<EMA((C+O)/2,6) AND EMA((C+O)/2,6)>=EMA((C+O)/2,12) AND EMA((C+O)/2,12)>=REF(EMA((C+O)/2,12),1) AND C>O,C,O,1.5,0),COLOR00EEEE;
    STICKLINE(EMA((C+O)/2,3)<EMA((C+O)/2,6) AND EMA((C+O)/2,6)>=EMA((C+O)/2,12) AND EMA((C+O)/2,12)>=REF(EMA((C+O)/2,12),1) AND C>O,C,O,0.5,0),COLOR00FFFF;

    IF((ZDEA/REF(ZDEA,1)-1)*1000<-10 AND ZDIF>ZDEA,HHV(H,BARSLAST(CROSS(MA(C,5),MA(C,2)))+1),DRAWNULL),COLORFF00FF,CROSSDOT,LINETHICK3;

    MA5,COLORFFFFFF;
    MA10,COLOR00FFFF;

    DRAWICON(CROSS(ZDIF,ZDEA),LLV(MA(C,5),5),1);
    DRAWICON(CROSS(ZDEA,ZDIF),HHV(MA(C,5),5),2);


     






    gd41391


    【下载地址隐藏】:                    点:回复可见地址
    游客,如果您要查看本帖隐藏内容请回复






    上一篇:「指标」通达信低吸绝技主图指标
    下一篇:「指标」通达信DXF日线主图指标
    回复

    举报

    QQ|

    GMT+8, 2024-11-10 01:28

    快速回复 返回顶部 返回列表