当前位置:→ 公式指标网 > 公式解答 > 正文 

    编写要求:

     

    www.gszx.com.cn网解答:

     网友求助:

    {DRAWGBK(1,COLORRGB(0,0,30),COLORRGB(0,0,100),1);}
    N1:=3;N2:=9;N3:=12;N4:=26;
    DIFF:=EMA(CLOSE,N3)-EMA(CLOSE,N4);
    DEA:=EMA(DIFF,N2);
    DRAWICON(DIFF>DEA,1,4);
    DRAWICON(DIFF<DEA,1,5);
    DRAWTEXTEX(1,1,980,950,'MACD'),colorFFFFFF;
    A1:=DIFF>DEA;
    RSV:=(CLOSE-LLV(LOW,N3))/(HHV(HIGH,N3)-LLV(LOW,N3))*100;
    K:=SMA(RSV,N1,1);
    D:=SMA(K,N1,1);
    DRAWICON(K>D,2,4);
    DRAWICON(K<D,2,5);
    DRAWTEXTEX(1,1,980,770,'KDJ'),colorFFFFFF;
    A2:=K>D;
    LC:=REF(CLOSE,1);
    RSI1:=(SMA(MAX(CLOSE-LC,0),N2,1))/(SMA(ABS(CLOSE-LC),N2,1))*100;
    RSI2:=(SMA(MAX(CLOSE-LC,0),N4,1))/(SMA(ABS(CLOSE-LC),N4,1))*100;
    DRAWICON(RSI1>RSI2,3,4);
    DRAWICON(RSI1<RSI2,3,5);
    DRAWTEXTEX(1,1,980,560,'RSI'),colorFFFFFF;
    A3:=RSI1>RSI2;
    RSV:=-(HHV(HIGH,N4)-CLOSE)/(HHV(HIGH,N4)-LLV(LOW,N4))*100;
    LWR1:=SMA(RSV,N1,1);
    LWR2:=SMA(LWR1,N1,1);
    DRAWICON(LWR1>LWR2,4,4);
    DRAWICON(LWR1<LWR2,4,5);
    DRAWTEXTEX(1,1,980,370,'LW&R'),colorFFFFFF;
    A4:=LWR1>LWR2;
    BBI:=(MA(CLOSE,N1)+MA(CLOSE,N2)+MA(CLOSE,N3)+MA(CLOSE,N4))/4;
    DRAWICON(CLOSE>BBI,5,4);
    DRAWICON(CLOSE<BBI,5,5);
    DRAWTEXTEX(1,1,980,170,'BBI'),colorFFFFFF;
    A5:=CLOSE>BBI;
    MTM:=CLOSE-REF(CLOSE,1);
    MMS:=100*EMA(EMA(MTM,N2),N1)/EMA(EMA(ABS(MTM),N2),N1);
    MMM:=100*EMA(EMA(MTM,N4),N3)/EMA(EMA(ABS(MTM),N4),N3);
    DRAWICON(MMS>MMM,6,4);
    DRAWICON(MMS<MMM,6,5);
    DRAWTEXTEX(1,1,980,-15,'ZLMM'),colorFFFFFF;
    A6:=MMS>MMM;
    VERTLINE(A1 AND A2 AND A3 AND A4 AND A5 AND A6),colorFFFF;
    涨不停买入:A1 AND A2 AND A3 AND A4 AND A5 AND A6=1 AND REF(A1 AND A2 AND A3 AND A4 AND A5 AND A6,1)=0,colorFFFF,LINETHICK2;
    DRAWICON(DIFF>DEA,1,4);
    DRAWICON(DIFF<DEA,1,5);
    DRAWICON(K>D,2,4);
    DRAWICON(K<D,2,5);
    DRAWICON(RSI1>RSI2,3,4);
    DRAWICON(RSI1<RSI2,3,5);
    DRAWICON(LWR1>LWR2,4,4);
    DRAWICON(LWR1<LWR2,4,5);
    DRAWICON(CLOSE>BBI,5,4);
    DRAWICON(CLOSE<BBI,5,5);
    DRAWICON(MMS>MMM,6,4);
    DRAWICON(MMS<MMM,6,5);
     
     
    解答如下:
    N1:=3;N2:=9;N3:=12;N4:=26;
    DIFF:=EMA(CLOSE,N3)-EMA(CLOSE,N4);
    DEA:=EMA(DIFF,N2);
    A1:=DIFF>DEA;
    RSV:=(CLOSE-LLV(LOW,N3))/(HHV(HIGH,N3)-LLV(LOW,N3))*100;
    K:=SMA(RSV,N1,1);
    D:=SMA(K,N1,1);
    A2:=K>D;
    LC:=REF(CLOSE,1);
    RSI1:=(SMA(MAX(CLOSE-LC,0),N2,1))/(SMA(ABS(CLOSE-LC),N2,1))*100;
    RSI2:=(SMA(MAX(CLOSE-LC,0),N4,1))/(SMA(ABS(CLOSE-LC),N4,1))*100;
    A3:=RSI1>RSI2;
    RSV:=-(HHV(HIGH,N4)-CLOSE)/(HHV(HIGH,N4)-LLV(LOW,N4))*100;
    LWR1:=SMA(RSV,N1,1);
    LWR2:=SMA(LWR1,N1,1);
    A4:=LWR1>LWR2;
    BBI:=(MA(CLOSE,N1)+MA(CLOSE,N2)+MA(CLOSE,N3)+MA(CLOSE,N4))/4;
    A5:=CLOSE>BBI;
    MTM:=CLOSE-REF(CLOSE,1);
    MMS:=100*EMA(EMA(MTM,N2),N1)/EMA(EMA(ABS(MTM),N2),N1);
    MMM:=100*EMA(EMA(MTM,N4),N3)/EMA(EMA(ABS(MTM),N4),N3);
    A6:=MMS>MMM;
    涨不停买入:A1 AND A2 AND A3 AND A4 AND A5 AND A6=1 AND REF(A1 AND A2 AND A3 AND A4 AND A5 AND A6,1)=0;
     

     

    互动内容:
    昵称: 验证码:验证码 

关于我们 - 联系我们 - 广告合作 - 下载声明 - 网站帮助 - 友情链接 - 网站地图 - RSS订阅 - TOP
Copyright © gszx.com.cn™,All Rights Reserved.ICP备案号:湘ICP备09016573号
股票公式,股票指标,股票软件,股票知识
股票公式,股票指标,股票软件,股票知识湘公网安备43108102000039号