• 网站首页
  • 股票知识
  • 股票公式
  • 散户炒股
  • 问答百科
  • 缠中说禅
  • 概念股
  • [股票知识]飞狐主图叠加MACD+KDJ+RSI指标公式

    发布时间: 2020-10-02 18:06 首页:股票一点通>股票公式>通达信公式> 阅读()

    {以下显示叠加指针的数值}
    k:"kdj.k",linethick,COLORWHITE;
    d:"kdj.d",linethick0,COLORYELLOW;
    r1:"rsi.rsi1",linethick0,ColorC080FF;
    r2:"rsi.rsi2",linethick0,ColorFF8080;
    r3:"rsi.rsi3",linethick0,Color87F8F4;
    f:"macd.diff",linethick0,Color72C072;
    a:"macd.dea",linethick0,ColorE98210;
    m:"macd.macd",linethick0,COLORWHITE;
    {以下定义叠加区间(在这里是可见K线的范围)}
    q:=SYSPARAM(3)-SYSPARAM(2);
    p:=SYSPARAM(3);
    {以下计算叠加比和叠加平移量}
    {1、叠加字段高度}
    kh:=hhv(h,q);
    kL:=LLv(L,q);
    dh:=hhv(max(k,d),q);
    dL:=LLv(min(k,d),q);
    mh:=hhv(max(f,a),q);
    mL:=LLv(max(f,a),q);
    rh:=hhv(max(max(r1,r2),r3),q);
    rL:=LLv(min(min(r1,r2),r3),q);
    {2、叠加比}
    bd:=(kh-kL)/(dh-dL)/3;
    bm:=(kh-kL)/(mh-mL)/3;
    br:=(kh-kL)/(rh-rL)/3;
    {3、叠加平移量}
    wk:=(kh-kL)/3;
    wd:=(kh+kL-(dh+dL)*bd)/2-wk[p];
    wm:=(kh+kL-(mh+mL)*bm)/2;
    wr:=(kh+kL-(rh+rL)*br)/2+wk[p];
    {以下画叠加线}
    PARTLINE(1,k*bd[p]+wd[p]),COLORWHITE;
    PARTLINE(1,d*bd[p]+wd[p])COLORYELLOW;
    PARTLINE(1,r1*br[p]+wr[p]),ColorC080FF;
    PARTLINE(1,r2*br[p]+wr[p]),ColorFF8080;
    PARTLINE(1,r3*br[p]+wr[p]),Color87F8F4;
    PARTLINE(1,f*bm[p]+wm[p]),Color72C072;
    PARTLINE(1,a*bm[p]+wm[p]),ColorE98210;
    STICKLINE(m>0,m*bm[p]+wm[p],wm[p],0.1,0),POINTDOT,COLORMAGENTA;
    STICKLINE(m<0,m*bm[p]+wm[p],wm[p],0.1,0),POINTDOT,COLORGREEN;
    {以下画叠加指针的横坐标线}
    PARTLINE(1,wm[p]),COLORWHITE;
    {股旁网-股票公式网站 }
    PARTLINE(1,20*br[p]+wr[p]),COLORGREEN,POINTDOT;
    PARTLINE(1,80*br[p]+wr[p]),COLORred,POINTDOT;
    PARTLINE(1,50*br[p]+wr[p]),COLORYELLOW,POINTDOT;
    PARTLINE(1,20*bd[p]+wd[p]),COLORGREEN,POINTDOT;
    PARTLINE(1,80*bd[p]+wd[p]),COLORred,POINTDOT;
    PARTLINE(1,50*bd[p]+wd[p]),COLORYELLOW,POINTDOT;
    {以下显示叠加指针的横坐标值}
    DRAWTEXT(p=BARPOS,(80*br[p]+wr[p])*1.015,'80\nrsi')COLORWHITE,ALIGN0;
    DRAWTEXT(p=BARPOS,(50*br[p]+wr[p])*1.015,'50\nrsi')COLORWHITE,ALIGN0;
    DRAWTEXT(p=BARPOS,(20*br[p]+wr[p])*1.015,'20\nrsi')COLORWHITE,ALIGN0;
    DRAWTEXT(p=BARPOS,(20*bd[p]+wd[p])*1.015,'20\nkdj')COLORWHITE,ALIGN0;
    DRAWTEXT(p=BARPOS,(50*bd[p]+wd[p])*1.015,'50\nkdj')COLORWHITE,ALIGN0;
    DRAWTEXT(p=BARPOS,(80*bd[p]+wd[p])*1.015,'80\nkdj')COLORWHITE,ALIGN0;
    DRAWTEXT(p=BARPOS,wm[p]*1.015,'0\nmacd')COLORWHITE,ALIGN0;A:=BACKSET(ISLASTBAR,BARSLAST(CROSS(K,D))+1);

    [股票知识]飞狐主图叠加MACD+KDJ+RSI指标公式

    特别声明:文章内容仅供参考,不造成任何投资建议。投资者据此操作,风险自担。

    网站首页-股票知识--股票公式-散户炒股-问答百科--缠中说禅-概念股

    未经本站书面特别授权,请勿转载或建立镜像

    Copyright @ 2020 All Rights Reserved.版权所有 XMl地图
    Baidu
    map