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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
    上一主题 下一主题

    [通达信] 通达信CCI+MACD日线副图指标公式


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

    22万

    主题

    22万

    帖子

    14

    精华

    积分
    11040
    楼主
    2024-1-24 13:15:21
    通达信CCI+MACD日线副图指标公式介绍

    通达信CCI+MACD日线副图指标公式

    通达信日线副图指标公式 CCI+MACD

    N:=5;
    TYP:=(HIGH+LOW+CLOSE)/3;
    CCI:(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));

    0,COLORGRAY;
    DIF12:=(EMA(CLOSE,12)-EMA(CLOSE,26))/((EMA(CLOSE,12)+EMA(CLOSE,26))/2)*1000;
    DEA12:=EMA(DIF12,9);
    KDIF12:=3*(DIF12-DEA12);
    KDEA12:=SMA(KDIF12,5,2);
    微分DIF:=KDIF12*5,COLORWHITE,LINETHICK1;
    微分DEA:=KDEA12*5,COLORYELLOW,LINETHICK1;
    MACD2:2*(微分DIF-微分DEA),COLORBLACK;
    MAMACD:=MA(MACD2,3),,COLORBLACK;
    STICKLINE(MACD2>REF(MACD2,1) AND MACD2>0,0,MACD2,1,0),COLORRED;
    STICKLINE(MACD2<=REF(MACD2,1) AND MACD2>0,0,MACD2,1,0),COLORYELLOW;
    STICKLINE(MACD2<REF(MACD2,1) AND MACD2<0,0,MACD2,1,0),COLORCYAN;
    STICKLINE(MACD2>=REF(MACD2,1) AND MACD2<0,0,MACD2,1,0),COLORMAGENTA;
    STICKLINE(MAMACD<1*REF(MAMACD,1), MAMACD, MACD2 ,3, 0),COLORBLUE;
    STICKLINE(MAMACD>1*REF(MAMACD,1), MAMACD, MACD2 , 3, 0),COLORLIRED;
    微分DIF2:KDIF12*5,COLORRED,LINETHICK1;{好股票www.guziyuan.cn}
    微分DEA2:KDEA12*5,COLORMAGENTA,LINETHICK1;
    NOTEXT强:IF(微分DIF2<MA(微分DIF2,2),微分DIF2,DRAWNULL),COLORGREEN;
    NOTEXT弱:IF(微分DEA2<MAX(微分DEA2,REF(微分DEA2,1)),微分DEA2,DRAWNULL),COLORYELLOW;
    DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*300,COLORWHITE,DOTLINE;
    DEA:=EMA(DIF,9),COLORYELLOW,DOTLINE;
    DIF普:=EMA(CLOSE,12)-EMA(CLOSE,26);
    DEA普:=EMA(DIF,9);
    MACD:=(DIF普-DEA普)*2,COLORSTICK;
    A1:=BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1));
    B1:=REF(C,A1+1)>C AND REF("MACD.DIF",A1+1)<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA");
    {DRAWTEXT(B1>0,DIF*0.7,'↙MACD底背'),COLORFF00FF; }
    C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1));
    D1:=REF(C,C1+1)<C AND REF("MACD.DIF",C1+1)>"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF");
    {DRAWTEXT(D1>0,DIF*1.2,'↙MACD顶离'),COLORBLUE;}{MACD顶背离}
    JC := DEA-DIF;
    绿柱面积:=IF(MACD<0,SUM(MACD,BARSLAST(JC<0)),0);
    红柱面积:=IF(MACD>0,SUM(MACD,BARSLAST(JC>0)),0);
    本次最低价:=LLV(L,BARSLAST(JC<0));
    本次最高价:=HHV(H,BARSLAST(JC>0));
    X1:=IF (MACD<0,BARSLAST(CROSS(DIF,DEA)),0);
    前次绿柱面积:=REF(绿柱面积,X1+1);
    前次最低价:=REF(本次最低价,X1+1);
    Y1:=IF((绿柱面积<0 AND ABS(绿柱面积)<ABS(前次绿柱面积)
    AND 本次最低价<前次最低价 ),1,0);
    RS1:= MACD<0 AND REF(MACD,1)<0 AND C<前次最低价
    AND ABS(绿柱面积)<ABS(前次绿柱面积) AND ABS(MACD)<ABS(REF(MACD,1));
    底背驰: IF (CROSS(DIF,DEA),REF(Y1,1),0);
    DRAWTEXT(底背驰,DIF*0.8,'↙积底背'),COLOR00FFFF;
    X2:=IF (MACD>0,BARSLAST(CROSS(DEA,DIF)),0);
    前次红柱面积:=REF(红柱面积,X2+1);
    前次最高价:=REF(本次最高价,X2+1);
    Y2:=IF((红柱面积>0 AND 红柱面积<前次红柱面积 AND 本次最高价>前次最高价 ),1,0);
    RS2:= MACD>0 AND REF(MACD,1)>0 AND C>前次最高价 AND ABS(红柱面积)<ABS(前次红柱面积) AND ABS(MACD)<ABS(REF(MACD,1));
    顶背驰:= IF (CROSS(DEA,DIF),REF(Y2,1),0);
    DRAWTEXT(顶背驰,DIF*0.8,'↙顶底背'),COLORGREEN;
    MACD高:=HHV(MACD,5);
    E:=REF(C,C1+1)>C AND DEA>0 AND REF(MACD高,C1+1)<MACD高 AND CROSS("MACD.DEA","MACD.DIF") ;
    {DRAWTEXT(E>0,DIF*1.1,'↙柱顶背'),COLORRED;}
    F:=REF(C,A1+1)>C AND DEA<0 AND REF(MACD高,A1+1)<MACD高 AND CROSS("MACD.DIF","MACD.DEA");
    {DRAWTEXT(F>0,DIF*0.9,'↙柱底背'),COLORYELLOW;};






    gd54845





    上一篇:黄金筹码线---上线就抢钱 牛熊通用 源码 无未来
    下一篇:通达信一剑飞仙副图/选股指标 源码 贴图
    回复

    举报

    QQ|

    GMT+8, 2024-11-15 09:39

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