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

    正文概述    2024-04-13 09:39:41  

    {www.9m8.cn}看平滑异同平均线macd值:SHORT=12;LONG=26;MID=9; 也可8,13,5; 也可10,20,7};
    SHORT:=8;
    LONG:=13;
    MID:=5;
    DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
    DEA:=EMA(DIF,MID);
    MACD:=(DIF-DEA)*2;
    MACDLINE:=IF(crOSS(DIF,DEA),1+1,IF(CROSS(DEA,DIF),1-0.5,1+0));
    A1:=DIF
    DRAWICON(DIF DEA,1,1); {www.9m8.cn}当MACD为红柱,画红箭头};
    DRAWICON(DIF DEA,1,2); {www.9m8.cn}当MACD为绿柱,画绿箭头};
    {www.9m8.cn}看随机指标kdj值:N=9,M1=3,M2=3; 也有人用8,3,3};
    N:=9;
    M1:=3;
    M2:=3;
    RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
    K:=SMA(RSV,M1,1);
    D:=SMA(K,M2,1);
    J:=3*K-2*D;
    kdJLINE:=IF(CROSS(K,D) AND CROSS(J,K),1,IF(CROSS(D,K) AND CROSS(K,J),0-0.5,0));
    A2:=K
    DRAWICON(K D,2,1); {www.9m8.cn}当KDJ向好,画红箭头};
    DRAWICON(K D,2,2); {www.9m8.cn}当KDJ向坏,画绿箭头};
    {www.9m8.cn}看相对强弱指标rsi值:N1=6; N2=12; N3=24; 也有人用5,13,};
    N1:=6; N2:=12; N3:=24;
    LC:=REF(CLOSE,1);
    RSI1:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(Abs(CLOSE-LC),N1,1)*100;
    RSI2:=SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100;
    RSI3:=SMA(MAX(CLOSE-LC,0),N3,1)/SMA(ABS(CLOSE-LC),N3,1)*100;
    A3:=RSI1 RSI2;
    DRAWICON(RSI1 RSI2,3,1); {www.9m8.cn}当RSI向好,画红箭头};
    DRAWICON(RSI1 RSI2,3,2); {www.9m8.cn}当RSI向坏,画绿箭头};
    {www.9m8.cn}看威廉指标Lwr:WN:=9; WM1:=3; WM2:=3; 也有人用WN:=13; WM1:=3; WM2:=3; 威廉指标采用反向,所以加 负号 };
    WN:=9; WM1:=3; WM2:=3;
    WRSV:=-(HHV(HIGH,WN)-CLOSE)/(HHV(HIGH,WN)-LLV(LOW,WN))*100; {www.9m8.cn}威廉指标采用反向,所以加 负号 };
    LWR1:=SMA(WRSV,WM1,1);
    LWR2:=SMA(LWR1,WM2,1);
    A4:=LWR1 LWR2;
    DRAWICON(LWR1 LWR2,4,1); {www.9m8.cn}当LWR向好,画红箭头};
    DRAWICON(LWR1 LWR2,4,2); {www.9m8.cn}当LWR向坏,画绿箭头};
    {www.9m8.cn}看多空均线bbi:BM1:=3; BM2:=6; BM3:=12; BM4:=24; };
    BM1:=3; BM2:=6; BM3:=12; BM4:=24;
    BBI:=(MA(CLOSE,BM1)+MA(CLOSE,BM2)+MA(CLOSE,BM3)+MA(CLOSE,BM4))/4;
    A5:=CLOSE
    DRAWICON(CLOSE BBI,5,1); {www.9m8.cn}当BBI向好,画红箭头};
    DRAWICON(CLOSE BBI,5,2); {www.9m8.cn}当BBI向坏,画绿箭头};
    {www.9m8.cn}看动量线mtm: 不采用原来的公式,采用改造的MTM};
    {www.9m8.cn}MN:=12; MM:=6;
    MTM:CLOSE-REF(CLOSE,MN);
    MTMMA:MA(MTM,M)};
    MTM:=CLOSE-REF(CLOSE,1);
    mms:=100*EMA(EMA(MTM,5),3)/EMA(EMA(ABS(MTM),5),3);
    MMM:=100*EMA(EMA(MTM,13),8)/EMA(EMA(ABS(MTM),13),8);
    A6:=MMS
    DRAWICON(MMS MMM,6,1); {www.9m8.cn}当MTM向好,画红箭头};
    DRAWICON(MMS MMM,6,2); {www.9m8.cn}当MTM向坏,画绿箭头};
    MACD红:=IF(A1,1,0),COLORRED;
    KDJ红 :=IF(A2,2,1),COLORMAGENTA;
    RSI红 :=IF(A3,3,2),COLORLIRED;
    LWR红 :=IF(A4,4,3),COLORYELLOW;
    BBI红 :=IF(A5,5,4),COLORCYAN;
    MTM红 :=IF(A6,6,5),COLORFF4700;
    红数:A1+A2+A3+A4+A5+A6, COLORYELLOW,NODRAW;
    买入:(红数=6 AND REF(红数,1) 6)*3, COLORYELLOW;
    卖出:红数 4 AND REF(红数,1) =4, COLORCYAN;
    {www.9m8.cn}DRAWTEXT(买入, 6.3, '买'),COLORYELLOW;
    DRAWTEXT(卖出, 6.3, '卖'),COLORCYAN;};

    通达信红色神剑指标公式源码副图

    通达信红色神剑指标公式源码副图

    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信红色神剑指标公式源码副图 加入收藏