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

    通达信公式

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

    通达信起飞主图,红线持股主图未加密选股指标公式源码

    来源:网络|编辑:小编|时间:2022-04-19|栏目:通达信公式

    DRAWTEXT_FIX(1,0.00,0,0,GNBLOCK)COLORWHITE;

    DRAWTEXT_FIX(ISLASTBAR,0.00,0.06,0,FGBLOCK)COLORBLUE;

    DRAWTEXT_FIX(ISLASTBAR,0.00,0.12,0,ZSBLOCK)COLORWHITE;

    {大盘上涨率 行业上涨率 行业上涨股相对大盘上涨股比例—称权重上涨率}

    大盘上涨数:=INDEXADV;

    大盘下跌数:=INDEXDEC;

    大盘上涨率:=大盘上涨数/(大盘上涨数+大盘下跌数)*100;

    大于70:=IF(大盘上涨率>=70,大盘上涨率,DRAWNULL);

    小于70:=IF(大盘上涨率<70,大盘上涨率,DRAWNULL);

    DRAWTEXT_FIX(1,0.0,0.18,0,'大盘上涨率:');

    DRAWNUMBER_FIX(1,0.07,0.18,0,CONST(大于70)),COLORWHITE;

    DRAWNUMBER_FIX(1,0.07,0.18,0,CONST(小于70)),COLORCYAN;

    DRAWTEXT_FIX(1,0.11,0.18,0,'%');

    行业上涨数:=HY_INDEXADV;

    行业下跌数:=HY_INDEXDEC;

    行业上涨率:=行业上涨数/(行业上涨数+行业下跌数)*100;

    大于70以上:=IF(行业上涨率>=70,行业上涨率,DRAWNULL);

    小于70以下:=IF(行业上涨率<70,行业上涨率,DRAWNULL);

    DRAWTEXT_FIX(1,0.13,0.18,0,'行业上涨率:');

    DRAWNUMBER_FIX(1,0.20,0.18,0,CONST(大于70以上)),COLORWHITE;

    DRAWNUMBER_FIX(1,0.20,0.18,0,CONST(小于70以下)),COLORCYAN;

    DRAWTEXT_FIX(1,0.24,0.18,0,'%');

    X11:=(FInaNCE(11)-FINANCE(15))/FINANCE(10)*1.2;

    X12:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;{盈余公积用资本公积金代替};

    X13:=FINANCE(23)/FINANCE(10)*3.3;

    X14:=FINANCE(19)/FINANCE(15)*0.6;{缺长期负债或负债总额}

    X15:=FINANCE(20)/FINANCE(15)*0.999;

    Z值:=X11+X12+X13+X14+X15;

    DRAWTEXT_FIX(Z值<1.2,0.9,0,0,' 【●财务重警●】'),COLORWHITE;

    DRAWTEXT_FIX( BETWEEN(Z值,1.2,2.6),0.9,0,0,' 【○财务轻警○】'),COLOR0099FF;

    DRAWTEXT_FIX(Z值>2.6,0.9,0,0,' 【◎财务无警◎】'),COLORLIGREEN;

    均:=(3*C+H+L+O)/6;

    短线:=(8*均+7*REF(均,1)+6*REF(均,2)+5*REF(均,3)+4*REF(均,4)+3*REF(均,5)+2*REF(均,6)+REF(均,7))/36;

    稳赢线:(LLV(短线,3)+LLV(短线,5)+LLV(短线,8))/3,LINETHICK1,crOSSDOT,COLORmaGENTA;

    机构控盘线:MA(CLOSE,20),COLORWHITE,LINETHICK3;

    IF(机构控盘线>REF(机构控盘线,1),机构控盘线,DRAWNULL),COLORWHITE,LINETHICK3;

    IF(机构控盘线<=REF(机构控盘线,1),机构控盘线,DRAWNULL),LINETHICK3,COLORCYAN;

    雷达线:ema(CLOSE,8),COLORFFCC66,LINETHICK2;

    IF(雷达线<REF(雷达线,2),雷达线,DRAWNULL),COLORRED,LINETHICK2;

    涨幅:=(C/REF(C,1)-1)*100;

    {涨幅A:=(C-REF(C,1))/REF(C,1)*100,NODRAW;

    连涨:=BArslASTCOUNT(C>REF(C,1) ),NODRAW;{连涨3天数}

    {A1A:=C>REF(C,1) ,NODRAW;

    A2A:=A1A*涨幅,NODRAW;

    最后1天:=SUM(A2A,连涨) AND REFXV(C<REF(C,1),1),NODRAW;

    求和:=SUM(A2A,连涨) ,NODRAW;

    DRAWTEXT(最后1天=1 AND 连涨>=3,H*1.01,VARCAT(VAR2STR(求和,2),'%')),COLORLIMAGENTA;}

    连涨:=BARSLASTCOUNT(C>REF(C,1)),NODRAW;{连涨天数}

    A1A:=C>REF(C,1),NODRAW;

    A2A:=A1A*涨幅,NODRAW;

    最后1天:=SUM(A2A,连涨) AND REFXV(C<REF(C,1),1),NODRAW;

    求和:=SUM(A2A,连涨) ,NODRAW;

    DRAWTEXT(最后1天=1 AND 连涨>=3 AND 求和<=10,H*1.01,VARCAT(VAR2STR(求和,1),'%')),COLORLIMAGENTA;

    DRAWTEXT(最后1天=1 AND 连涨>=3 AND 求和>10,H*1.01,VARCAT(VAR2STR(求和,1),'%')),COLORBLUE;

    连跌:=BARSLASTCOUNT(C<REF(C,1)),NODRAW;{连跌天数}

    A1B:=C<REF(C,1) ,NODRAW;

    A2B:=A1B*涨幅,NODRAW;

    最后1天B:=SUM(A2B,连跌) AND REFXV(C>REF(C,1),1),NODRAW;

    求和B:=SUM(A2B,连跌) ,NODRAW;

    DRAWTEXT(最后1天B=1 AND 连跌>=3 AND 求和B<-10,L*0.99,VARCAT(VAR2STR(求和B*-1,1),'%')),COLORCYAN;

    DRAWTEXT_FIX(1,0.915,0.93,0,'连续涨'),COLORBLUE;

    DRAWNUMBER_FIX(1,0.96,0.93,0,CONST(连涨)),COLORWHITE;

    DRAWTEXT_FIX(1,0.98,0.93,0,'天'),COLORBLUE;

    DRAWTEXT_FIX(1,0.915,1,0,'连续跌'),COLORCYAN;

    DRAWNUMBER_FIX(1,0.96,1,0,CONST(连跌)),COLORCYAN;

    DRAWTEXT_FIX(1,0.98,1,0,'天'),COLORCYAN;

    RC1:=REF(C,1);

    ZT:=C/REF(C,1)>1.099 AND H>L;

    CS:=IF(C>=1,10000,100000);

    C涨停10:=1.10*RC1-49/CS;{考虑到4舍5入}

    C涨停5 :=1.05*RC1-49/CS;

    C跌停10:=0.90*RC1+51/CS;

    C跌停5 :=0.95*RC1+51/CS;

    ST:=NAMELIKE('S') OR NAMELIKE('*S');

    涨停:= IF(ST, C>=C涨停5, C>=C涨停10);

    跌停:= IF(ST, C<=C跌停5, C<=C跌停10);

    盘中涨停:=IF(ST, H>=C涨停5, H>=C涨停10);

    盘中跌停:=IF(ST, L<=C跌停5, L<=C跌停10);

    STICKLINE(盘中涨停,H,MAX(C,O),0,0),COLORLIMAGENTA;{涨停后回落}

    STICKLINE(盘中跌停,L,MIN(C,O),0,0),COLORLIRED;{跌停后回升};

    STICKLINE(涨停,O,C,1,0),COLORLIMAGENTA;

    STICKLINE(跌停,O,C,1,0),COLORLIRED;

    {涨停}

    STICKLINE(C/REF(C,1)>=1.09,O,C,3.2,0),COLOR0033FF;

    STICKLINE(C/REF(C,1)>=1.09,O,C,2.8,0),COLOR0055FF;

    STICKLINE(C/REF(C,1)>=1.09,O,C,2.4,0),COLOR0077FF;

    STICKLINE(C/REF(C,1)>=1.09,O,C,2.0,0),COLOR0099FF;

    STICKLINE(C/REF(C,1)>=1.09,O,C,1.6,0),COLOR00AAFF;

    STICKLINE(C/REF(C,1)>=1.09,O,C,0.8,0),COLOR00CCFF;

    STICKLINE(C/REF(C,1)>=1.09,O,C,0.4,0),COLOR00ddfF;

    STICKLINE(C/REF(C,1)>=1.09,O,C,0.0,0),COLOR00EEFF;

    DRAWTEXT_FIX(1,0.980,20,1,'公式在线网'),COLOR666666;

    {跌停}

    A:=REF(C,1);B:=ZTPRICE(A,0.1)=C AND H=C;

    DD:=DTPRICE(A,0.1)=C AND L=C;

    STICKLINE(DD,H,L,0.00001,0),COLORCYAN;

    STICKLINE(DD,O,C,3.2,0),COLOR005500;

    STICKLINE(DD,O,C,2.4,0),COLOR007700;

    STICKLINE(DD,O,C,1.6,0),COLOR009900;

    STICKLINE(DD,O,C,0.8,0),COLOR00BB00;

    STICKLINE(DD,O,C,0.4,0),COLOR00DD00;

    STICKLINE(DD,O,C,0.0,0),COLOR00FF00;

    天线:=MA(C,5),DOTLINE,COLORRED,LINETHICK0;

    人线:=MA(C,36),NODRAW;

    地线:=人线*0.99,COLORWHITE;

    金线:=人线*0.97,DOTLINE;

    D11:=天线/地线;

    D2:=D11>=1 AND D11<1.02;

    D3:=CROSS(C,天线) AND CROSS(C,地线);

    伏1:=D2 AND D3 AND 天线>地线 AND L<地线 AND O<地线;

    伏:=FILTER(伏1,40)*1,COLORBLUE;

    DRAWTEXT(伏,L*0.99,'埋★伏'),COLORBLUE;

    DRAWICON(伏,L*0.975,25);

    DRAWSL(伏 AND C>O,C,0,35,0),COLORBLUE;

    DRAWSL(伏 AND C<O,O,0,35,0),COLORCYAN;

    DRAWSL(伏,H,0,35,0),COLORLIMAGENTA;

    XA:=BARSLAST(伏),NODRAW;

    伏值C:=REF(C,XA);

    伏值H:=REF(H,XA);

    起飞:=(CROSS(C,伏值C) OR CROSS(C,伏值H)) AND H>L AND C>REF(C,1) AND REF(伏=0,1) AND XA<=30 AND XA>2 AND 涨幅>=2 AND 涨幅<9.91;

    起飞过滤:=FILTER(起飞,10);

    DRAWTEXT(起飞过滤,L*0.99,'起飞'),COLORBLUE;

    起飞2:=(CROSS(C,伏值C) OR CROSS(C,伏值H)) AND H>L AND C>REF(C,1) AND REF(伏=0,1) AND XA<=30 AND 涨幅>=9.91;

    DRAWTEXT(起飞2,L*0.99,'起飞爆'),COLORBLUE;

    起飞异动:=起飞过滤=1 AND (vol*10000/FINANCE(7)>=5 OR 涨幅>=5);

    DRAWTEXT(起飞异动,L*0.99,'起飞'),COLORLIMAGENTA;

    DRAWTEXT(起飞异动,L*0.97,'异动'),COLORLIMAGENTA;

    image.png



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

    DRAWTEXT_FIX(1,0.00,0,0,GNBLOCK)COLORWHITE;DRAWTEXT_FIX(ISLASTBAR,0.00,0.06,0,FGBLOCK)COLORBLUE;DRAWTEXT_FIX(ISLASTBAR,0.00,0.12,0,ZSBLOCK)COLORWHITE;{大盘上涨率 行业上涨率 行业上涨股相对大盘上涨股比例—称权重上涨率}大盘上涨数:=INDEXADV;大盘下跌数:=INDEXDEC;大盘上涨率:=大盘上涨数/(大盘上涨数+大盘下跌数)*100;大于70:=IF(大盘上涨率>=70,大盘上涨率,DRAWNULL);小于70:=IF(大盘上涨率<70,大盘上涨率,DRAWNULL);DRAWTEXT_FIX(1,0.0,0.18,0,'大盘上涨率:');DRAWNUMBER_FIX(1,0.07,0.18,0,CONST(大于70)),COLORWHITE;DRAWNUMBER_FIX(1,0.07,0.18,0,CONST(小于70)),COLORCYAN;DRAWTEXT_FIX(1,0.11,0.18,0,'%');行业上涨数:=HY_INDEXADV;行业下跌数:=HY_INDEXDEC;行业上涨率:=行业上涨数/(行业上涨数+行业下跌数)*100;大于70以上:=IF(行业上涨率>=70,行业上涨率,DRAWNULL);小于70以下:=IF(行业上涨率<70,行业上涨率,DRAWNULL);DRAWTEXT_FIX(1,0.13,0.18,0,'行业上涨率:');DRAWNUMBER_FIX(1,0.20,0.18,0,CONST(大于70以上)),COLORWHITE;DRAWNUMBER_FIX(1,0.20,0.18,0,CONST(小于70以下)),COLORCYAN;DRAWTEXT_FIX(1,0.24,0.18,0,'%');X11:=(FInaNCE(11)-FINANCE(15))/FINANCE(10)*1.2;X12:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;{盈余公积用资本公积金代替};X13:=FINANCE(23)/FINANCE(10)*3.3;X14:=FINANCE(19)/FINANCE(15)*0.6;{缺长期负债或负债总额}X15:=FINANCE(20)/FINANCE(15)*0.999;Z值:=X11+X12+X13+X14+X15;DRAWTEXT_FIX(Z值<1.2,0.9,0,0,' 【●财务重警●】'),COLORWHITE;DRAWTEXT_FIX( BETWEEN(Z值,1.2,2.6),0.9,0,0,' 【○财务轻警○】'),COLOR0099FF;DRAWTEXT_FIX(Z值>2.6,0.9,0,0,' 【◎财务无警◎】'),COLORLIGREEN;均:=(3*C+H+L+O)/6;短线:=(8*均+7*REF(均,1)+6*REF(均,2)+5*REF(均,3)+4*REF(均,4)+3*REF(均,5)+2*REF(均,6)+REF(均,7))/36;稳赢线:(LLV(短线,3)+LLV(短线,5)+LLV(短线,8))/3,LINETHICK1,crOSSDOT,COLORmaGENTA;机构控盘线:MA(CLOSE,20),COLORWHITE,LINETHICK3;IF(机构控盘线>REF(机构控盘线,1),机构控盘线,DRAWNULL),COLORWHITE,LINETHICK3;IF(机构控盘线<=REF(机构控盘线,1),机构控盘线,DRAWNULL),LINETHICK3,COLORCYAN;雷达线:ema(CLOSE,8),COLORFFCC66,LINETHICK2;IF(雷达线<REF(雷达线,2),雷达线,DRAWNULL),COLORRED,LINETHICK2;涨幅:=(C/REF(C,1)-1)*100;{涨幅A:=(C-REF(C,1))/REF(C,1)*100,NODRAW;连涨:=BArslASTCOUNT(C>REF(C,1) ),NODRAW;{连涨3天数}{A1A:=C>REF(C,1) ,NODRAW;A2A:=A1A*涨幅,NODRAW;最后1天:=SUM(A2A,连涨) AND REFXV(C<REF(C,1),1),NODRAW;求和:=SUM(A2A,连涨) ,NODRAW;DRAWTEXT(最后1天=1 AND 连涨>=3,H*1.01,VARCAT(VAR2STR(求和,2),'%')),COLORLIMAGENTA;}连涨:=BARSLASTCOUNT(C>REF(C,1)),NODRAW;{连涨天数}A1A:=C>REF(C,1),NODRAW;A2A:=A1A*涨幅,NODRAW;最后1天:=SUM(A2A,连涨) AND REFXV(C<REF(C,1),1),NODRAW;求和:=SUM(A2A,连涨) ,NODRAW;DRAWTEXT(最后1天=1 AND 连涨>=3 AND 求和<=10,H*1.01,VARCAT(VAR2STR(求和,1),'%')),COLORLIMAGENTA;DRAWTEXT(最后1天=1 AND 连涨>=3 AND 求和>10,H*1.01,VARCAT(VAR2STR(求和,1),'%')),COLORBLUE;连跌:=BARSLASTCOUNT(C<REF(C,1)),NODRAW;{连跌天数}A1B:=C<REF(C,1) ,NODRAW;A2B:=A1B*涨幅,NODRAW;最后1天B:=SUM(A2B,连跌) AND REFXV(C>REF(C,1),1),NODRAW;求和B:=SUM(A2B,连跌) ,NODRAW;DRAWTEXT(最后1天B=1 AND 连跌>=3 AND 求和B<-10,L*0.99,VARCAT(VAR2STR(求和B*-1,1),'%')),COLORCYAN;DRAWTEXT_FIX(1,0.915,0.93,0,'连续涨'),COLORBLUE;DRAWNUMBER_FIX(1,0.96,0.93,0,CONST(连涨)),COLORWHITE;DRAWTEXT_FIX(1,0.98,0.93,0,'天'),COLORBLUE;DRAWTEXT_FIX(1,0.915,1,0,'连续跌'),COLORCYAN;DRAWNUMBER_FIX(1,0.96,1,0,CONST(连跌)),COLORCYAN;DRAWTEXT_FIX(1,0.98,1,0,'天'),COLORCYAN;RC1:=REF(C,1);ZT:=C/REF(C,1)>1.099 AND H>L;CS:=IF(C>=1,10000,100000);C涨停10:=1.10*RC1-49/CS;{考虑到4舍5入}C涨停5 :=1.05*RC1-49/CS;C跌停10:=0.90*RC1+51/CS;C跌停5 :=0.95*RC1+51/CS;ST:=NAMELIKE('S') OR NAMELIKE('*S');涨停:= IF(ST, C>=C涨停5, C>=C涨停10);跌停:= IF(ST, C<=C跌停5, C<=C跌停10);盘中涨停:=IF(ST, H>=C涨停5, H>=C涨停10);盘中跌停:=IF(ST, L<=C跌停5, L<=C跌停10);STICKLINE(盘中涨停,H,MAX(C,O),0,0),COLORLIMAGENTA;{涨停后回落}STICKLINE(盘中跌停,L,MIN(C,O),0,0),COLORLIRED;{跌停后回升};STICKLINE(涨停,O,C,1,0),COLORLIMAGENTA;STICKLINE(跌停,O,C,1,0),COLORLIRED;{涨停}STICKLINE(C/REF(C,1)>=1.09,O,C,3.2,0),COLOR0033FF;STICKLINE(C/REF(C,1)>=1.09,O,C,2.8,0),COLOR0055FF;STICKLINE(C/REF(C,1)>=1.09,O,C,2.4,0),COLOR0077FF;STICKLINE(C/REF(C,1)>=1.09,O,C,2.0,0),COLOR0099FF;STICKLINE(C/REF(C,1)>=1.09,O,C,1.6,0),COLOR00AAFF;STICKLINE(C/REF(C,1)>=1.09,O,C,0.8,0),COLOR00CCFF;STICKLINE(C/REF(C,1)>=1.09,O,C,0.4,0),COLOR00ddfF;STICKLINE(C/REF(C,1)>=1.09,O,C,0.0,0),COLOR00EEFF;DRAWTEXT_FIX(1,0.980,20,1,'公式在线网'),COLOR666666;{跌停}A:=REF(C,1);B:=ZTPRICE(A,0.1)=C AND H=C;DD:=DTPRICE(A,0.1)=C AND L=C;STICKLINE(DD,H,L,0.00001,0),COLORCYAN;STICKLINE(DD,O,C,3.2,0),COLOR005500;STICKLINE(DD,O,C,2.4,0),COLOR007700;STICKLINE(DD,O,C,1.6,0),COLOR009900;STICKLINE(DD,O,C,0.8,0),COLOR00BB00;STICKLINE(DD,O,C,0.4,0),COLOR00DD00;STICKLINE(DD,O,C,0.0,0),COLOR00FF00;天线:=MA(C,5),DOTLINE,COLORRED,LINETHICK0;人线:=MA(C,36),NODRAW;地线:=人线*0.99,COLORWHITE;金线:=人线*0.97,DOTLINE;D11:=天线/地线;D2:=D11>=1 AND D11<1.02;D3:=CROSS(C,天线) AND CROSS(C,地线);伏1:=D2 AND D3 AND 天线>地线 AND L<地线 AND O<地线;伏:=FILTER(伏1,40)*1,COLORBLUE;DRAWTEXT(伏,L*0.99,'埋★伏'),COLORBLUE;DRAWICON(伏,L*0.975,25);DRAWSL(伏 AND C>O,C,0,35,0),COLORBLUE;DRAWSL(伏 AND C<O,O,0,35,0),COLORCYAN;DRAWSL(伏,H,0,35,0),COLORLIMAGENTA;XA:=BARSLAST(伏),NODRAW;伏值C:=REF(C,XA);伏值H:=REF(H,XA);起飞:=(CROSS(C,伏值C) OR CROSS(C,伏值H)) AND H>L AND C>REF(C,1) AND REF(伏=0,1) AND XA<=30 AND XA>2 AND 涨幅>=2 AND 涨幅<9.91;起飞过滤:=FILTER(起飞,10);DRAWTEXT(起飞过滤,L*0.99,'起飞'),COLORBLUE;起飞2:=(CROSS(C,伏值C) OR CROSS(C,伏值H)) AND H>L AND C>REF(C,1) AND REF(伏=0,1) AND XA<=30 AND 涨幅>=9.91;DRAWTEXT(起飞2,L*0.99,'起飞爆'),COLORBLUE;起飞异动:=起飞过滤=1 AND (vol*10000/FINANCE(7)>=5 OR 涨幅>=5);DRAWTEXT(起飞异动,L*0.99,'起飞'),COLORLIMAGENTA;DRAWTEXT(起飞异动,L*0.97,'异动'),COLORLIMAGENTA;

    未发现:CAPITAL...

    未发现:COST...

    未发现:DYNAINFO...

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

    未发现:LWINNER...

    未发现:WINNER...

    未发现:BACKSET...

    未发现:BARSNEXT...

    未发现:CURRBARSCOUNT...

    未发现:DVOL...

    未发现:DOPEN...

    未发现:DCLOSE...

    未发现:DHIGH...

    未发现:DLOW...

    未发现:DRAWLINE...

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

    未发现:FLATZIG...

    未发现:FLATZIGA...

    未发现:FFT...

    未发现:FILTERX...

    未发现:PEAK...

    未发现:PEAKA...

    未发现:PEAKBARS...

    未发现:PEAKBARSA...

    未发现:PLOYLINE...

    未发现:REFDATE...

    未发现:TROUGH...

    未发现:TROUGHA...

    未发现:TROUGHBARS...

    未发现:XMA...

    未发现:ZIG...

    未发现:ZIGA...

    未发现:ZXNH...

    未发现:#YEAR...

    未发现:#MONTH...

    未发现:#WEEK...

    未发现:$ZIG...

    未发现:$PEAK...

    未发现:$PEAKBARS...

    未发现:$TROUGH...

    未发现:$TROUGHBARS...

    未发现:$FLATZIG...

    未发现:$FLATZIGA...

    未发现:$PEAKA...

    未发现:$PEAKBARSA...

    未发现:$TROUGHA...

    未发现:$ZIGA...

    未发现:$FFT...

    未发现:$BACKSET...

    未发现:$WINNER...

    未发现:$LWINNER...

    未发现:$COST...

    未发现:$DYNAINFO...

    未发现:$FINANCE...

    未发现:$DRAWLINE...


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

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

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

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

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