最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • MACD主图(大智慧主图 源码)

    正文概述    2024-04-07 21:27:47  

    input:lONG(26),SHORT(12),M(9);
    DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG),COLORRED,linethick0;
    DEA : EMA(DIFF,M),COLORMAGENTA,linethick0;
    MACD : 2*(DIFF-DEA) ,linethick0;
    A:=HHV(DIFF,300);
    A*1.3,colorgreen,linethick0;
    B:=MACD-REF(MACD,1);
    mxa:=max(HHVALL(diff),HHVALL(dea),HHVALL(macd));
    mna:=min(LLVALL(diff),LLVALL(dea),LLVALL(macd));
    a2:=(mxa+mna)/2;
    a3:=mxa-mna;
    mxb:=HHVALL(H);
    mnb:=LLVALL(L);
    b2:=(mxb+mnb)/2;
    b3:=mxb-mnb;
    diffa:=(diff-a2)*(b3/a3)+b2;
    deaa:=(dea-a2)*(b3/a3)+b2;
    macda:=(macd-a2)*(b3/a3)+b2;
    b4:=-a2*(b3/a3)+b2;
    PARTLINE(DIFFA,DIFF REF(DIFF ,1), RGB(0,255,0),1,rgb(255,0,0)), linethick1;
    PARTLINE(DEAA,DEA REF(DEA,1),RGB(51,204,204),1,RGB(255,0,255)),linethick1;
    STICKLINE(MACD 0 AND B 0,b4,MACDA,1,0),COLORRED;
    STICKLINE(MACD 0 AND B 0,b4,MACDA,1,0),COLORGREEN;
    STICKLINE(MACD 0 AND B 0,b4,MACDA,1,0),COLORMAGENTA;
    STICKLINE(MACD 0 AND B 0,b4,MACDA,1,0),COLORBLUE;


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » MACD主图(大智慧主图 源码) 加入收藏