• 网站首页
  • 股票池
  • 通达信公式
  • 大智慧公式
  • 同花顺公式
  • 套装公式
  • 指标专题
  • 股票内参
  • 滚动播报

    通达信公式

    当前位置: 主页 > 通达信公式

    通达信双向黄金分割未加密选股指标公式源码

    来源:网络|编辑:小编|时间:2023-01-02|栏目:通达信公式

    N:=6000;

    高:=REFDATE(HHV(H,N),DATE);
    低:=REFDATE(LLV(L,N),DATE);
    H1:=高-(高-低)*0.191;
    H2:=高-(高-低)*0.382;
    H3:=高-(高-低)*0.5;
    H4:=高-(高-低)*0.618;
    H5:=高-(高-低)*0.809;
    H6:=高-(高-低)*0.764;
    H7:=高-(高-低)*0.236;
    STICKLINE(CURRBARSCOUNT=8,高,高,0,1),COLORCYAN;
    STICKLINE(CURRBARSCOUNT=8,H1,H1,0,1),COLORGREEN;
    STICKLINE(CURRBARSCOUNT=8,H2,H2,0,1),COLORCCCCCC;
    DRAWTEXT(CURRBARSCOUNT=10,高,' 1.000'),COLORCYAN;
    DRAWTEXT(CURRBARSCOUNT=10,H1,'0.809'),COLORGREEN;
    DRAWTEXT(CURRBARSCOUNT=10,H2,' 0.618'),COLORFFFFFF;
    DRAWTEXT(CURRBARSCOUNT=10,H3,' 0.500'),COLORBLUE;
    DRAWTEXT(CURRBARSCOUNT=10,H4,' 0.382'),COLORLICYAN;
    DRAWTEXT(CURRBARSCOUNT=10,H6,' 0.236'),COLORCYAN;
    DRAWTEXT(CURRBARSCOUNT=10,H5,' 0.191'),COLORmaGENTA;
    DRAWTEXT(CURRBARSCOUNT=10,H7,' 0.764'),COLORWHITE;
    DRAWTEXT(CURRBARSCOUNT=10,低,' 0.000'),COLORWHITE;
    STICKLINE(CURRBARSCOUNT=8,H3,H3,0,1),COLORBLUE;
    STICKLINE(CURRBARSCOUNT=8,H4,H4,0,1),COLORLICYAN;
    STICKLINE(CURRBARSCOUNT=8,H6,H6,0,1),COLORCYAN;
    STICKLINE(CURRBARSCOUNT=8,H5,H5,0,1),COLORLIMAGENTA;
    STICKLINE(CURRBARSCOUNT=8,低,低,0,1),COLORWHITE;
    STICKLINE(CURRBARSCOUNT=8,H7,H7,0,1),COLORWHITE;
    DRAWTEXT(CURRBARSCOUNT=50,高*0.99,CON2STR(高,2)),COLORCYAN;
    DRAWTEXT(CURRBARSCOUNT=50,H1,CON2STR(H1,2)),COLORGREEN;
    DRAWTEXT(CURRBARSCOUNT=50,H2,CON2STR(H2,2)),COLORFFFFFF;
    DRAWTEXT(CURRBARSCOUNT=50,H3,CON2STR(H3,2)),COLORBLUE;
    DRAWTEXT(CURRBARSCOUNT=50,H6,CON2STR(H6,2)),COLORCYAN;
    DRAWTEXT(CURRBARSCOUNT=50,H4,CON2STR(H4,2)),COLORLICYAN;
    DRAWTEXT(CURRBARSCOUNT=50,H5,CON2STR(H5,2)),COLORLIMAGENTA;
    DRAWTEXT(CURRBARSCOUNT=50,H7,CON2STR(H7,2)),COLORWHITE;
    DRAWTEXT(CURRBARSCOUNT=50,低*1.01,CON2STR(低,2)),COLORWHITE;

    HDAY:=800;LDAY:=800;调点:=3;角度:=100;
    CURR:=CURRBARSCOUNT;
    TCH:=CONST(FINDHIGH(H,0,HDAY*10,1));
    GTT:=CONST(BArslAST(TCH=H))+1;
    SX跌H:=CONST(IF(GTT=1,H,REF(H,GTT-1)));
    BCL:=CONST(FINDLOW(L,0,LDAY*10,1));
    DTT:=CONST(BARSLAST(BCL=L))+1;
    SX涨L:=CONST(IF(DTT=1,L,REF(L,DTT-1)));
    涨点:=BARSSINCE(BacKSET(ISLASTBAR,BARSLAST(L=SX涨L)+1));
    跌点:=BARSSINCE(BACKSET(ISLASTBAR,BARSLAST(H=SX跌H)+1));
    最低:=IF(调点=1,跌点,IF(调点=2,涨点,IF(调点=3,涨点,跌点)));
    L斜率:=角度/IF(C<300,1000,10);
    最高:=IF(调点=1,跌点,IF(调点=2,涨点,IF(调点=3,跌点,涨点)));
    H斜率:=角度/IF(C<300,1000,10);
    IM68:=((SX跌H-SX涨L)/6-(SX跌H-SX涨L)/8);
    GH跌X:=SX跌H+(SX跌H-SX涨L)/8;
    DL涨X:=SX涨L-(SX跌H-SX涨L)/8;
    GTHT:=IF(DTT>GTT,DTT,GTT);

    {黄金分割}
    X000:IF(CURR<=GTHT,SX跌H-(SX跌H-SX涨L)*0.000,DRAWNULL),DOTLINE,COLOR556600;
    DRAWTEXT(CURR=GTHT,(X000)*1.001,STRCAT(' 0.000 ',CON2STR(X000,2))),COLORF5CCEB;
    X191:IF(CURR<=GTHT,SX跌H-(SX跌H-SX涨L)*0.191,DRAWNULL),DOTLINE,COLOR556600;
    DRAWTEXT(CURR=GTHT,(X191)*1.001,STRCAT(' 0.191 ',CON2STR(X191,2))),COLORF5CCEB;
    X236:IF(CURR<=GTHT,SX跌H-(SX跌H-SX涨L)*0.236,DRAWNULL),DOTLINE,COLOR556600;
    DRAWTEXT(CURR=GTHT,(X236)*1.001,STRCAT(' 0.236 ',CON2STR(X236,2))),COLORF5CCEB;
    X382:IF(CURR<=GTHT,SX跌H-(SX跌H-SX涨L)*0.382,DRAWNULL),DOTLINE,COLOR556600;
    DRAWTEXT(CURR=GTHT,(X382)*1.001,STRCAT(' 0.382 ',CON2STR(X382,2))),COLORF5CCEB;
    X500:IF(CURR<=GTHT,SX跌H-(SX跌H-SX涨L)*0.500,DRAWNULL),DOTLINE,COLOR556600;
    DRAWTEXT(CURR=GTHT,(X500)*1.001,STRCAT(' 0.500 ',CON2STR(X500,2))),COLORF5CCEB;
    X618:IF(CURR<=GTHT,SX跌H-(SX跌H-SX涨L)*0.618,DRAWNULL),DOTLINE,COLOR556600;
    DRAWTEXT(CURR=GTHT,(X618)*1.001,STRCAT(' 0.618 ',CON2STR(X618,2))),COLORF5CCEB;
    X764:IF(CURR<=GTHT,SX跌H-(SX跌H-SX涨L)*0.764,DRAWNULL),DOTLINE,COLOR556600;
    DRAWTEXT(CURR=GTHT,(X764)*1.001,STRCAT(' 0.764 ',CON2STR(X764,2))),COLORF5CCEB;
    X809:IF(CURR<=GTHT,SX跌H-(SX跌H-SX涨L)*0.809,DRAWNULL),DOTLINE,COLOR556600;
    DRAWTEXT(CURR=GTHT,(X809)*1.001,STRCAT(' 0.809 ',CON2STR(X809,2))),COLORF5CCEB;
    X1:IF(CURR<=GTHT,SX跌H-(SX跌H-SX涨L)*1.000,DRAWNULL),DOTLINE,COLOR556600;
    DRAWTEXT(CURR=GTHT,(X1)*1.001,STRCAT(' 1.000. ',CON2STR(X1,2))),COLORF5CCEB;

    image.png



    未来函数检测公式代码域:

    N:=6000;高:=REFDMTE(HHV(H,N),DMTE); 低:=REFDMTE(LLV(L,N),DMTE);H1:=高-(高-低)*0.191;H2:=高-(高-低)*0.382;H3:=高-(高-低)*0.5;H4:=高-(高-低)*0.618;H5:=高-(高-低)*0.809;H6:=高-(高-低)*0.764;H7:=高-(高-低)*0.236;STICKLINE(CURRBMRSCOUNT=8,高,高,0,1),COLORCYMN;STICKLINE(CURRBMRSCOUNT=8,H1,H1,0,1),COLORGREEN;STICKLINE(CURRBMRSCOUNT=8,H2,H2,0,1),COLORCCCCCC;DRMWTEXT(CURRBMRSCOUNT=10,高,' 1.000'),COLORCYMN;DRMWTEXT(CURRBMRSCOUNT=10,H1,'0.809'),COLORGREEN;DRMWTEXT(CURRBMRSCOUNT=10,H2,' 0.618'),COLORFFFFFF;DRMWTEXT(CURRBMRSCOUNT=10,H3,' 0.500'),COLORBLUE;DRMWTEXT(CURRBMRSCOUNT=10,H4,' 0.382'),COLORLICYMN;DRMWTEXT(CURRBMRSCOUNT=10,H6,' 0.236'),COLORCYMN;DRMWTEXT(CURRBMRSCOUNT=10,H5,' 0.191'),COLORmaGENTM;DRMWTEXT(CURRBMRSCOUNT=10,H7,' 0.764'),COLORWHITE;DRMWTEXT(CURRBMRSCOUNT=10,低,' 0.000'),COLORWHITE;STICKLINE(CURRBMRSCOUNT=8,H3,H3,0,1),COLORBLUE;STICKLINE(CURRBMRSCOUNT=8,H4,H4,0,1),COLORLICYMN;STICKLINE(CURRBMRSCOUNT=8,H6,H6,0,1),COLORCYMN;STICKLINE(CURRBMRSCOUNT=8,H5,H5,0,1),COLORLIMMGENTM;STICKLINE(CURRBMRSCOUNT=8,低,低,0,1),COLORWHITE;STICKLINE(CURRBMRSCOUNT=8,H7,H7,0,1),COLORWHITE;DRMWTEXT(CURRBMRSCOUNT=50,高*0.99,CON2STR(高,2)),COLORCYMN;DRMWTEXT(CURRBMRSCOUNT=50,H1,CON2STR(H1,2)),COLORGREEN;DRMWTEXT(CURRBMRSCOUNT=50,H2,CON2STR(H2,2)),COLORFFFFFF;DRMWTEXT(CURRBMRSCOUNT=50,H3,CON2STR(H3,2)),COLORBLUE;DRMWTEXT(CURRBMRSCOUNT=50,H6,CON2STR(H6,2)),COLORCYMN;DRMWTEXT(CURRBMRSCOUNT=50,H4,CON2STR(H4,2)),COLORLICYMN;DRMWTEXT(CURRBMRSCOUNT=50,H5,CON2STR(H5,2)),COLORLIMMGENTM;DRMWTEXT(CURRBMRSCOUNT=50,H7,CON2STR(H7,2)),COLORWHITE;DRMWTEXT(CURRBMRSCOUNT=50,低*1.01,CON2STR(低,2)),COLORWHITE;HDMY:=800;LDMY:=800;调点:=3;角度:=100;CURR:=CURRBMRSCOUNT;TCH:=CONST(FINDHIGH(H,0,HDMY*10,1));GTT:=CONST(BMrslMST(TCH=H))+1;SX跌H:=CONST(IF(GTT=1,H,REF(H,GTT-1)));BCL:=CONST(FINDLOW(L,0,LDMY*10,1));DTT:=CONST(BMRSLMST(BCL=L))+1;SX涨L:=CONST(IF(DTT=1,L,REF(L,DTT-1)));涨点:=BMRSSINCE(BacKSET(ISLMSTBMR,BMRSLMST(L=SX涨L)+1));跌点:=BMRSSINCE(BMCKSET(ISLMSTBMR,BMRSLMST(H=SX跌H)+1));最低:=IF(调点=1,跌点,IF(调点=2,涨点,IF(调点=3,涨点,跌点)));L斜率:=角度/IF(C<300,1000,10);最高:=IF(调点=1,跌点,IF(调点=2,涨点,IF(调点=3,跌点,涨点)));H斜率:=角度/IF(C<300,1000,10);IM68:=((SX跌H-SX涨L)/6-(SX跌H-SX涨L)/8);GH跌X:=SX跌H+(SX跌H-SX涨L)/8;DL涨X:=SX涨L-(SX跌H-SX涨L)/8;GTHT:=IF(DTT>GTT,DTT,GTT);{黄金分割}X000:IF(CURR<=GTHT,SX跌H-(SX跌H-SX涨L)*0.000,DRMWNULL),DOTLINE,COLOR556600;DRMWTEXT(CURR=GTHT,(X000)*1.001,STRCMT(' 0.000 ',CON2STR(X000,2))),COLORF5CCEB;X191:IF(CURR<=GTHT,SX跌H-(SX跌H-SX涨L)*0.191,DRMWNULL),DOTLINE,COLOR556600;DRMWTEXT(CURR=GTHT,(X191)*1.001,STRCMT(' 0.191 ',CON2STR(X191,2))),COLORF5CCEB;X236:IF(CURR<=GTHT,SX跌H-(SX跌H-SX涨L)*0.236,DRMWNULL),DOTLINE,COLOR556600;DRMWTEXT(CURR=GTHT,(X236)*1.001,STRCMT(' 0.236 ',CON2STR(X236,2))),COLORF5CCEB;X382:IF(CURR<=GTHT,SX跌H-(SX跌H-SX涨L)*0.382,DRMWNULL),DOTLINE,COLOR556600;DRMWTEXT(CURR=GTHT,(X382)*1.001,STRCMT(' 0.382 ',CON2STR(X382,2))),COLORF5CCEB;X500:IF(CURR<=GTHT,SX跌H-(SX跌H-SX涨L)*0.500,DRMWNULL),DOTLINE,COLOR556600;DRMWTEXT(CURR=GTHT,(X500)*1.001,STRCMT(' 0.500 ',CON2STR(X500,2))),COLORF5CCEB;X618:IF(CURR<=GTHT,SX跌H-(SX跌H-SX涨L)*0.618,DRMWNULL),DOTLINE,COLOR556600;DRMWTEXT(CURR=GTHT,(X618)*1.001,STRCMT(' 0.618 ',CON2STR(X618,2))),COLORF5CCEB;X764:IF(CURR<=GTHT,SX跌H-(SX跌H-SX涨L)*0.764,DRMWNULL),DOTLINE,COLOR556600;DRMWTEXT(CURR=GTHT,(X764)*1.001,STRCMT(' 0.764 ',CON2STR(X764,2))),COLORF5CCEB;X809:IF(CURR<=GTHT,SX跌H-(SX跌H-SX涨L)*0.809,DRMWNULL),DOTLINE,COLOR556600;DRMWTEXT(CURR=GTHT,(X809)*1.001,STRCMT(' 0.809 ',CON2STR(X809,2))),COLORF5CCEB;X1:IF(CURR<=GTHT,SX跌H-(SX跌H-SX涨L)*1.000,DRMWNULL),DOTLINE,COLOR556600;DRMWTEXT(CURR=GTHT,(X1)*1.001,STRCMT(' 1.000. ',CON2STR(X1,2))),COLORF5CCEB;

    未发现:CMPITML...

    未发现:COST...

    未发现:DYNMINFO...

    未发现:FINMNCE...

    未发现:LWINNER...

    未发现:WINNER...

    警惕!警惕!警惕!该公式包含未来函数:BMCKSET...

    未发现:BMRSNEXT...

    警惕!警惕!警惕!该公式包含未来函数:CURRBMRSCOUNT...

    未发现:DVOL...

    未发现:DOPEN...

    未发现:DCLOSE...

    警惕!警惕!警惕!该公式包含未来函数:DHIGH...

    警惕!警惕!警惕!该公式包含未来函数:DLOW...

    未发现:DRMWLINE...

    未发现:REFX...

    未发现:FLMTZIG...

    未发现:FLMTZIGM...

    未发现:FFT...

    未发现:FILTERX...

    未发现:PEMK...

    未发现:PEMKM...

    未发现:PEMKBMRS...

    未发现:PEMKBMRSM...

    未发现:PLOYLINE...

    警惕!警惕!警惕!该公式包含未来函数:REFDMTE...

    未发现:TROUGH...

    未发现:TROUGHM...

    未发现:TROUGHBMRS...

    未发现:XMM...

    未发现:ZIG...

    未发现:ZIGM...

    未发现:ZXNH...

    未发现:#YEMR...

    未发现:#MONTH...

    未发现:#WEEK...

    未发现:$ZIG...

    未发现:$PEMK...

    未发现:$PEMKBMRS...

    未发现:$TROUGH...

    未发现:$TROUGHBMRS...

    未发现:$FLMTZIG...

    未发现:$FLMTZIGM...

    未发现:$PEMKM...

    未发现:$PEMKBMRSM...

    未发现:$TROUGHM...

    未发现:$ZIGM...

    未发现:$FFT...

    未发现:$BMCKSET...

    未发现:$WINNER...

    未发现:$LWINNER...

    未发现:$COST...

    未发现:$DYNMINFO...

    未发现:$FINMNCE...

    未发现:$DRMWLINE...


    免责声明 | 联系我们 | 服务协议

    重要申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。

    如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

    联系QQ:875328188 | 邮箱:875328188@qq.com

    Copyright © 2002-2021 股票公式网 版权所有桂ICP备2022000688号