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

    正文概述    2024-04-14 15:05:24  

    通达信买卖均线公式源码

    本主图指标为三条变色均线与多条黄金分割线组成,上涨下跌、压力支撑一目了然,买卖决策,简洁明了,便于指导操作。

    VAR2:MA(C,5),COLORRED,LINETHICK3;
    上翘:IF(VAR2>REF(VAR2,1),VAR2,DRAWNULL),COLORRED,LINETHICK3;
    下拐:IF(VAR2 VAR1:MA(C,20),COLORRED;
    上升:IF(VAR1>REF(VAR1,1),VAR1,DRAWNULL),COLORRED;
    下降:IF(VAR1 M60:MA(C,60),COLORWHITE POINTDOT;
    IF(M60>=REF(M60,1),M60,DRAWNULL),LINETHICK2,COLORRED;
    IF(M60<=REF(M60,1),M60,DRAWNULL),LINETHICK1,COLORCC9900;

    DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
    DEA:=EMA(DIFF,9);
    MACD:=2*(DIFF-DEA);
    MACD1:=CROSS(DIFF,DEA) AND COUNT(MACD>0,1)=1;
    RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
    K:=SMA(RSV,9,1);
    D:=SMA(K,9,1);
    J:=3*K-2*D;
    KDJ1:=CROSS(K,D) AND CROSS(J,D);
    均线:=CROSS(MA(C,5),MA(C,10));
    量线:=CROSS(MA(V,5),MA(V,10));

    SCC:=MACD1 AND KDJ1 AND 均线 AND 量线;
    SC1:=MACD1 AND KDJ1;
    SC2:=均线 AND 量线;
    SC3:=均线 AND MACD1;
    SC4:=量线 AND KDJ1;
    SC5:=均线 AND KDJ1;
    SC6:=MACD1 AND 量线;
    DRAWICON(SC1 OR SC2 OR SC3 OR SC4 OR SC5 OR SC6,L-0.20,9);{两个以上指标同时金叉显示9号图标}
    DRAWICON(SCC,L-0.20,3);{四个指标同时金叉显示3号图标,便于区别}

    LC:=REF(CLOSE,1);
    RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
    FF:=EMA(CLOSE,3);
    MA15:=EMA(CLOSE,21);
    日:=150;昨前:=3;
    高1:=REF(HHV(H,日),昨前);
    低1:=REF(LLV(L,日),昨前);
    H1:=高1-(高1-低1)*0.191;
    H2:=高1-(高1-低1)*0.382;
    H3:=高1-(高1-低1)*0.5;
    H4:=高1-(高1-低1)*0.618;
    H5:=高1-(高1-低1)*0.809;
    顶:REFDATE(高1,DATE),COLORRED;
    一0.809:REFDATE(H1,DATE),COLORYELLOW;
    二0.618:REFDATE(H2,DATE),COLORMAGENTA;
    三0.500:REFDATE(H3,DATE),COLORWHITE;
    四0.382:REFDATE(H4,DATE),COLORGREEN;
    五0.191:REFDATE(H5,DATE),COLORYELLOW;
    低:REFDATE(低1,DATE),COLORRED;
    DRAWICON(CMA(C,10) AND REF(C,1)1.03 AND V/CAPITAL>0.03,L*0.97,9);


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信买卖均线主图公式源码 加入收藏