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

    正文概述    2024-04-14 16:48:18  

    {提前MACD}
    DIF:=(EMA(C,3)-EMA(L,30))/EMA(L,30)*600;
    DEA:=EMA(DIF,7);
    BC:=2*(DIF-DEA);
    DQS:=3*DEA-2*DIF;
    信号:DIF,COLORWHITE;
    平滑:DEA,COLORYELLOW;
    倍差:BC,COLORLIMAGENTA,NODRAW;
    趋势:DQS,COLORCYAN,NODRAW;
    BC1:=MA(BC,2);
    BC2:=IF(WINNER(C*0.95)*100>50 AND COST(85)=REF(BC,1),BC,DRAWNULL);
    QSDT:=DIF>REF(DIF,1) AND DIF>0 AND BC>BC1 AND WINNER(C*0.95)*100>50 AND COST(85) 高度控盘:BARSLAST(QSDT=0),COLORYELLOW,NODRAW;
    {DRAWBAND(BC,RGB(250,250,0),MA(BC,2),RGB(0,200,250))};
    STICKLINE(BC>0 AND BC>=REF(BC,1),0,BC,2.8,0),COLOR000055;
    STICKLINE(BC>0 AND BC>=REF(BC,1),0,BC,2.6,0),COLOR000077;
    STICKLINE(BC>0 AND BC>=REF(BC,1),0,BC,2.4,0),COLOR000099;
    STICKLINE(BC>0 AND BC>=REF(BC,1),0,BC,2.2,0),COLOR0000BB;
    STICKLINE(BC>0 AND BC>=REF(BC,1),0,BC,2.0,2),COLOR0000DD;
    STICKLINE(BC>0 AND BC>=REF(BC,1),0,BC,1.0,0),COLOR0000FF;
    STICKLINE(BC<0 AND BC STICKLINE(BC<0 AND BC STICKLINE(BC<0 AND BC STICKLINE(BC<0 AND BC STICKLINE(BC<0 AND BC STICKLINE(BC<0 AND BC STICKLINE(BC>0 AND BC STICKLINE(BC>0 AND BC STICKLINE(BC>0 AND BC STICKLINE(BC>0 AND BC STICKLINE(BC>0 AND BC STICKLINE(BC>0 AND BC STICKLINE(BC>0 AND BC STICKLINE(BC<0 AND BC>=REF(BC,1),0,BC,2.8,0),COLORAA0044;
    STICKLINE(BC<0 AND BC>=REF(BC,1),0,BC,2.6,0),COLORBB0055;
    STICKLINE(BC<0 AND BC>=REF(BC,1),0,BC,2.4,0),COLORCC0066;
    STICKLINE(BC<0 AND BC>=REF(BC,1),0,BC,2.2,0),COLORDD0077;
    STICKLINE(BC<0 AND BC>=REF(BC,1),0,BC,2.0,2),COLOREE0088;
    STICKLINE(BC<0 AND BC>=REF(BC,1),0,BC,1.0,0),COLORFF00BB;
    STICKLINE(BC2,0,BC2,2.8,0),COLOR0044AA;
    STICKLINE(BC2,0,BC2,2.6,0),COLOR0055BB;
    STICKLINE(BC2,0,BC2,2.4,0),COLOR0066CC;
    STICKLINE(BC2,0,BC2,2.2,0),COLOR0077DD;
    STICKLINE(BC2,0,BC2,2.0,2),COLOR0088EE;
    STICKLINE(BC2,0,BC2,1.0,0),COLOR00BBFF;
    FG:=(DIF-DEA)/6;
    PH1:=EMA(DIF,1);
    PH2:=PH1-FG*1;
    PH3:=PH1-FG*2;
    PH4:=PH1-FG*3;
    PH5:=PH1-FG*4;
    PH6:=PH1-FG*5;
    PH7:=EMA(DIF,7);
    PH8:=IF(PH1 PH9:=IF(PH2 PH10:=IF(PH3 PH11:=IF(PH4 PH12:=IF(PH5 PH13:=IF(PH6 PH14:=IF(PH7 PH15:=IF(PH1>REF(PH1,1) AND PH1>PH7,PH1,DRAWNULL);
    PH16:=IF(PH2>REF(PH2,1) AND PH2>PH7,PH2,DRAWNULL);
    PH17:=IF(PH3>REF(PH3,1) AND PH3>PH7,PH3,DRAWNULL);
    PH18:=IF(PH4>REF(PH4,1) AND PH4>PH7,PH4,DRAWNULL);
    PH19:=IF(PH5>REF(PH5,1) AND PH5>PH7,PH5,DRAWNULL);
    PH20:=IF(PH6>REF(PH6,1) AND PH6>PH7,PH6,DRAWNULL);
    PH21:=IF(PH7>REF(PH7,1),PH7,DRAWNULL);
    DRAWBAND(PH1,RGB(250,250,0),PH1,RGB(250,250,0));
    DRAWBAND(PH2,RGB(250,250,0),PH2,RGB(250,250,0));
    DRAWBAND(PH3,RGB(250,250,0),PH3,RGB(250,250,0));
    DRAWBAND(PH4,RGB(250,250,0),PH4,RGB(250,250,0));
    DRAWBAND(PH5,RGB(250,250,0),PH5,RGB(250,250,0));
    DRAWBAND(PH6,RGB(250,250,0),PH6,RGB(250,250,0));
    DRAWBAND(PH7,RGB(250,250,0),PH7,RGB(250,250,0));
    DRAWBAND(PH8,RGB(0,250,0),PH8,RGB(0,250,0));
    DRAWBAND(PH9,RGB(0,250,0),PH9,RGB(0,250,0));
    DRAWBAND(PH10,RGB(0,250,0),PH10,RGB(0,250,0));
    DRAWBAND(PH11,RGB(0,250,0),PH11,RGB(0,250,0));
    DRAWBAND(PH12,RGB(0,250,0),PH12,RGB(0,250,0));
    DRAWBAND(PH13,RGB(0,250,0),PH13,RGB(0,250,0));
    DRAWBAND(PH14,RGB(0,250,0),PH14,RGB(0,250,0));
    DRAWBAND(PH15,RGB(250,0,250),PH15,RGB(250,0,250));
    DRAWBAND(PH16,RGB(250,0,250),PH16,RGB(250,0,250));
    DRAWBAND(PH17,RGB(250,0,250),PH17,RGB(250,0,250));
    DRAWBAND(PH18,RGB(250,0,250),PH18,RGB(250,0,250));
    DRAWBAND(PH19,RGB(250,0,250),PH19,RGB(250,0,250));
    DRAWBAND(PH20,RGB(250,0,250),PH20,RGB(250,0,250));
    DRAWBAND(PH21,RGB(250,0,250),PH21,RGB(250,0,250));
    NOTEXT:DQS,COLORCYAN;
    DRAWICON(CROSS(DIF,DEA),DEA,42);
    DRAWICON(CROSS(DEA,DIF),DEA,43);

    ---------------------------------

    {MACD主图}
    ZIF:=EMA(C,12)-EMA(C,26);
    ZEA:=EMA(ZIF,9);
    ZBC:=2*(ZIF-ZEA);
    ZJS:=1.25*ZIF-0.25*ZEA;
    ZXH:=(ZJS*13*27-27*11*EMA(C,12)+13*25*EMA(C,26))/28,COLORWHITE;
    ZPH:=(ZIF*13*27-27*11*EMA(C,12)+13*25*EMA(C,26))/28,COLORYELLOW;
    ZQS:=(ZEA*13*27-27*11*EMA(C,12)+13*25*EMA(C,26))/28,COLORCYAN;
    ZNX:=(ZXH+ZQS)/2,COLORMAGENTA;
    信号:ZXH,COLORFFFFFF,LINETHICK1;
    平滑:ZPH,COLOR00FFFF,LINETHICK1;
    牛熊:ZNX,COLORFF00FF,LINETHICK1;
    趋势:ZQS,COLORFFFF00,LINETHICK1;
    DRAWKLINE(H,O,L,C);


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 提前MACD(源码 主图/副图 通达信) 加入收藏