当前位置: 网站首页 > 股票软件公式 > 通达信公式 > 文章 当前位置: 通达信公式 > 文章

通达信源码:五指抄底,抓板分时主图,财务副图指标

点击: 次    来源:顶尖财经    作者:股市狙击 - 小 + 大

五指抄底:

思路是提取十条指标的核心算法,
数据为多头的时候标记为1,,,,
十个指标全是空头时,反而是大底,
 
所以出现大底时提示买入.
 
其实可以无限添加各种指标,但指标过多会影响运行速度.
 
有经验的人都知道,底是永远抄不完的,,抄底之后还有新底,所以不要找下行趋势的股票抄底,要找横盘或上行趋势的抄底。

{五指抄底}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
条件1:=SMA(RSV,3,1)>25;
T1:=IF((DATE<=1341231),1,0);
VAR2:=(CLOSE+HIGH+LOW)/(3);
VAR3:=(EMA(VAR2,10))*(T1);
VAR4:=(REF(VAR3,1))*(T1);
条件2:=VAR3>VAR4;
AA:=REF(CLOSE,1);
BBB:=SMA(MAX(CLOSE-AA,0),21,1)/SMA(ABS(CLOSE-AA),21,1)*1000;
HHH:=BBB-LLV(BBB,27);
CCC:=LLV(BBB,27)-BBB;
MMM:=(MA(HHH,2)*3+HHH*13)/16,COLORFF00FF,LINETHICK1;
SS:=(MA(CCC,2)*3+CCC*13)/16,COLORFF00FF,LINETHICK1;
GG:=MA(HHH,5),LINETHICK1,COLORGREEN;
MM:=MA(CCC,5),LINETHICK1,COLORGREEN;
WW:=IF(MMM<GG ,SS,MM),LINETHICK1, COLORCYAN;
EE:=IF(SS<MM ,GG,MMM),COLORFFFFCC,LINETHICK1;
指标:=MA(EE-WW,5);
条件3:=指标>75;
Z_1:=C-REF(C,1);
空:=EMA(EMA(Z_1,6),6)/EMA(EMA(ABS(Z_1),6),6)*20;
条件4:=空>-9;
CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20); 
DD:=DMA(CLOSE,CC); 
天:=(1+7/100)*DD;
地:=(1-7/100)*DD ;
QS:=3*SMA((C-地)/(天-地)*100,5,1)-2*SMA(SMA((C-地)/(天-地)*100,5,1),3,1);
条件5:=QS>35;
抄底:(条件1+条件2+条件3+条件4+条件5)=0;




抓板分时主图:

抓板分时指标 分时主图( 顶尖财经 股票学院: http://www.58188.com )

千辛万苦招来的公式,分享

FX1:=VOL/CLOSE/3;

 FX2:=SUM(IF(FX1>0.2 AND CLOSE>REF(CLOSE,1),FX1,0),0);

 FX3:=SUM(IF(FX1>0.2 AND CLOSE<REF(CLOSE,1),FX1,0),0);

 FX4:=FX2+FX3;

 FX5:=1;

 FX6:=FX2/FX3;

 FX7:=EMA((-100)*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),4)+100;

 FX8:=MAX(DYNAINFO(3),DYNAINFO(5));

 FX9:=MIN(DYNAINFO(3),DYNAINFO(6));

 FX10:=FX8-FX9;

 FX11:=FX9+FX10*7/8;

 FX12:=FX9+FX10*0.5/8;

 FX13:=SUM(CLOSE*VOL,240)/SUM(VOL,240);

 FX14:=BARSCOUNT(CLOSE);

 FX15:=MA(CLOSE,FX14);

 FX16:=FX15+2*STD(CLOSE,3);

 FX17:=FX15-2*STD(CLOSE,3);

 FX18:=TIME>93000;

 FX19:=CLOSE/REF(CLOSE,1)>1.02;

 FX20:=CLOSE/REF(CLOSE,1)<0.98;

 FX21:=(HHV(CLOSE,FX14)-LLV(CLOSE,FX14))/CLOSE<0.05;

 FX22:=SMA(VOL,30,1);

 FX23:=(FX22-LLV(LLV(FX22,1),30))/(HHV(HHV(FX22,1),30)-LLV(LLV(FX22,1),30))>0.95;

 FX24:=FX19 OR FX20;

 FX25:=FX24=0 AND FX21 AND FX23 AND CROSS(FX13,FX15);

 IF(MACD.DEA<0,CLOSE,DRAWNULL),COLORYELLOW,LINETHICK9;

 FX26:=SUM(AMOUNT,BARSCOUNT(CLOSE))/SUM(VOL*100,BARSCOUNT(CLOSE));

 FX27:=EXPMA(CLOSE/FX26,20);

 FX28:=EXPMA(CLOSE/FX26,60);

 FX29:=EXPMA(CLOSE/FX26,120);

 FX30:=1;

 1.02,NODRAW;

 FX31:=1.03;

 FX32:=FX27>FX28 AND FX27>1.003 AND FX28>FX29 AND CLOSE>EXPMA(CLOSE,20) AND EXPMA(CLOSE,10)>EXPMA(CLOSE,20) AND EXPMA(CLOSE,20)>EXPMA(CLOSE,60);

 DRAWICON(FX27>FX28 AND FX28>FX29 AND CLOSE>EXPMA(CLOSE,20) AND EXPMA(CLOSE,10)>EXPMA(CLOSE,20) AND EXPMA(CLOSE,20)>EXPMA(CLOSE,60) AND FX27=HHV(FX27,30) AND CROSS(FX27,1.003),CLOSE,25);

 DRAWICON(CROSS(FX27,1.02),CLOSE,24);

 DRAWICON(CROSS(FX27,1.04),CLOSE,26);

 FX33:=MAX(DYNAINFO(3),DYNAINFO(5));

 FX34:=MIN(DYNAINFO(3),DYNAINFO(6));

 FX35:=FX33-FX34;

压力线:FX34+FX35*7/8,COLORMAGENTA,LINETHICK2;

支撑线:FX34+FX35*0.5/8,COLORGREEN,LINETHICK2;

中线:(支撑线+压力线)/2,COLORWHITE,LINETHICK2;

 FX36:=SUM(IF(CLOSE>REF(CLOSE,1) AND VOL>4000,VOL/1000,0),0);

 FX37:=SUM(IF(CLOSE<REF(CLOSE,1) AND VOL>4000,VOL/1000,0),0);

 FX38:=SUM(IF(CLOSE>REF(CLOSE,1),VOL/1000,0),0);

 FX39:=SUM(IF(CLOSE<REF(CLOSE,1),VOL/1000,0),0);

 FX40:=FX38-FX36;

 FX41:=FX39-FX37;

 FX42:=FX36;

 FX43:=FX37;

 FX44:=FX40;

 FX45:=FX41;

 FX46:=FX36-FX37;

 FX47:=FX40-FX41;

 FX48:=FX38-FX39;

 FX49:=CONST(MAX(ABS(FX42),MAX(ABS(FX43),MAX(ABS(FX44),ABS(FX45)))));

地:EMA(FX13,50)/0.97,COLORGREEN,LINETHICK2;

 IF(地>REF(地,1),地,DRAWNULL),COLORRED,LINETHICK2;

平衡线:(FX13+地)/2,DOTLINE,COLORGREEN;

 FX50:=COUNT(VOL>4000 AND CLOSE>REF(CLOSE,1),0);

黄次数:COUNT(VOL>DYNAINFO(16)*10 AND CLOSE>REF(CLOSE,1),0),NODRAW,COLORYELLOW;

 DRAWICON(FX50>REF(FX50,1) AND 黄次数>REF(黄次数,1) AND CROSS(CLOSE,地),CLOSE,7);

 DRAWICON(FX40>FX41 AND FX36>FX40 AND FX41>FX37,FX13,38);

 SUM(VOL*CLOSE,0)/SUM(VOL,0),COLORYELLOW;





财务副图指标:

财务副图指标,简单明了,不加密,用于通达信副图显示,不能用于选股

DRAWRECTREL(0,0,990,990,RGB(20,18,12));
DRAWTEXT_FIX(1,0.14,0.01,1,'股东股份:'),COLORRED;
品种类型:=FINANCE(3);
所属板块:=HYBLOCK;
上市天数:=FINANCE(42);
{股总市值:=ROUND(FINANCE(41)/100000000);}
流通盘:=(CAPITAL/1000000);
流通市值:=ROUND(FINANCE(40)/100000000);
股东人数:=FINANCE(8);
人均持股:=ROUND(FINANCE(7)/FINANCE(8));
DRAWTEXT_FIX(1,0.14,0.15,1,'品种类型:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.14,0.25,1,'所属板块:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.14,0.35,1,'上市天数:'),COLORYELLOW;
{DRAWTEXT_FIX(1,0.14,0.45,1,'股总市值:'),COLORYELLOW;}
DRAWTEXT_FIX(1,0.14,0.45,1,'流通盘:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.14,0.55,1,'流通市值:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.14,0.65,1,'股东人数:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.14,0.75,1,'人均持股:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.23,0.25,1,HYBLOCK),COLORLIGREEN;
DRAWNUMBER_FIX(1,0.2,0.35,1,上市天数),COLORWHITE;
DRAWNUMBER_FIX(1,0.19,0.45,1,流通盘),COLORWHITE;
DRAWNUMBER_FIX(1,0.19,0.55,1,流通市值),COLORWHITE;
DRAWNUMBER_FIX(1,0.2,0.65,1,股东人数),COLORWHITE;
DRAWNUMBER_FIX(1,0.2,0.75,1,人均持股),COLORWHITE;
DRAWTEXT_FIX(品种类型=1,0.23,0.15,1,'沪 深 A 股'),COLORMAGENTA;
DRAWTEXT_FIX(品种类型=2,0.23,0.15,1,' 中 小 板'),COLORMAGENTA;
DRAWTEXT_FIX(品种类型=3,0.23,0.15,1,' 创 业 板'),COLORMAGENTA;
DRAWTEXT_FIX(1,0.23,0.35,1,'天'),COLORCYAN;
DRAWTEXT_FIX(1,0.23,0.45,1,'亿元'),COLORCYAN;
DRAWTEXT_FIX(1,0.23,0.55,1,'亿元'),COLORCYAN;
DRAWTEXT_FIX(1,0.23,0.65,1,'人'),COLORCYAN;
DRAWTEXT_FIX(1,0.23,0.75,1,'股'),COLORCYAN;
DRAWTEXT_FIX(1,0.326,0.01,1,'业绩指标:'),COLORRED;
净资收益率:=(FINANCE(33)/FINANCE(34)*100);
销售毛利率:=CONST(((FINANCE(20)-FINANCE(21))/FINANCE(20)*100));
净利润比率:=(FINANCE(30)/FINANCE(20)*100);
主营利润率:=(FINANCE(23)/FINANCE(20)*100);
优质资产率:=((FINANCE(19)-FINANCE(22)-FINANCE(27))/FINANCE(19));{理论上越大越好但不同行业有不同标准};
现金负债比:=(FINANCE(25)/FINANCE(15));{缺长期负债或负债总额,理论上越大越好但不同行业有不同标准};
净利同增率:=FINANCE(43);
总市值(亿):FINANCE(41)/100000000,NODRAW; 净资产:FINANCE(34),NODRAW;
销净利率:FINVALUE(199),NODRAW; 净利润(万):FINANCE(30)/10000,NODRAW; 净利增长率:=FINVALUE(184),NODRAW;
DRAWTEXT_FIX(1,0.34,0.15,1,'净资收益率:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.34,0.25,1,'销售毛利率:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.34,0.35,1,'净利润率 :'),COLORYELLOW;
DRAWTEXT_FIX(1,0.34,0.45,1,'主营利润率:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.34,0.55,1,'优质资产率:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.34,0.65,1,'现金负债比:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.34,0.75,1,'净利同增率:'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.4,0.15,1,净资收益率),COLORWHITE;
DRAWNUMBER_FIX(1,0.4,0.25,1,销售毛利率),COLORWHITE;
DRAWNUMBER_FIX(1,0.4,0.35,1,净利润比率),COLORWHITE;
DRAWNUMBER_FIX(1,0.4,0.45,1,主营利润率),COLORWHITE;
DRAWNUMBER_FIX(1,0.4,0.55,1,优质资产率),COLORWHITE;
DRAWNUMBER_FIX(1,0.4,0.65,1,现金负债比),COLORWHITE;
DRAWNUMBER_FIX(1,0.4,0.75,1,净利同增率),COLORWHITE;
DRAWTEXT_FIX(1,0.498,0.01,1,'财务指标:'),COLORRED;
市净率:=CONST(DYNAINFO(7) / FINANCE(34));
市销率:=CONST(FINANCE(1)*DYNAINFO(7)/FINANCE(20));
{每股收益季:=CONST(FINANCE(33)/(5-FINANCE(37)));}
每股收益:=CONST(FINANCE(38));{最近一期}
每股现金流:=CONST((FINANCE(25)/FINANCE(1)));
每股未分配:=CONST(FINANCE(32));
每股公积金:=CONST(FINANCE(18));
市盈率:=CONST(C/FINANCE(33));
{毛利率:=CONST(((FINANCE(20)-FINANCE(21))/FINANCE(20)*100));}
DRAWTEXT_FIX(1,0.51,0.15,1,'市净率:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.51,0.25,1,'市销率:'),COLORYELLOW;
{DRAWTEXT_FIX(1,0.51,0.35,1,'每股收益季:'),COLORYELLOW;}
{DRAWTEXT_FIX(1,0.51,0.35,1,'毛利率 :'),COLORYELLOW;}
DRAWTEXT_FIX(1,0.51,0.45,1,'每股收益:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.51,0.55,1,'每股现金流:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.51,0.65,1,'每股未分配:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.51,0.75,1,'每股公积金:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.51,0.35,1,'市盈率:'),COLORYELLOW;
DRAWNUMBER_FIX(1,0.57,0.15,1,市净率),COLORWHITE;
DRAWNUMBER_FIX(1,0.57,0.25,1,市销率),COLORWHITE;
{DRAWNUMBER_FIX(1,0.57,0.35,1,每股收益季),COLORWHITE;}
DRAWNUMBER_FIX(1,0.57,0.45,1,每股收益),COLORWHITE;
DRAWNUMBER_FIX(1,0.57,0.55,1,每股现金流),COLORWHITE;
DRAWNUMBER_FIX(1,0.57,0.65,1,每股未分配),COLORWHITE;
DRAWNUMBER_FIX(1,0.57,0.75,1,每股公积金),COLORWHITE;
DRAWNUMBER_FIX(1,0.57,0.35,1,市盈率),COLORWHITE;
{DRAWNUMBER_FIX(1,0.57,0.85,1,毛利率),COLORWHITE;}
主力筹码估算:=EMA(WINNER(CLOSE)*70,3),NODRAW,LINETHICK0;
散户筹码估算:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3),NODRAW;
散户套牢比率:=散户筹码估算/(主力筹码估算+散户筹码估算)*100,NODRAW;
主力控盘比率:=主力筹码估算/(主力筹码估算+散户筹码估算)*100,NODRAW,LINETHICK0;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.07,0.88,0,'■ 主力筹码估算:'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.22,0.88,0,' %'),COLORFFCC99;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.17,0.88,0,主力筹码估算),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.35,0.88,0,'■ 主力控盘比率:'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.50,0.88,0,' %'),COLORFFCC99;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.45,0.88,0,主力控盘比率),COLORRED;
{风险系数}
X1:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;
X2:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;{盈余公积用资本公积金代替}
X3:=FINANCE(23)/FINANCE(10)*3.3;
X4:=FINANCE(19)/FINANCE(15)*0.6;{缺长期负债或负债总额}
X5:=FINANCE(20)/FINANCE(15)*0.999;
Z值:=X1+X2+X3+X4+X5;
DRAWTEXT_FIX(1,0.85,0.01,1,'财务预警:'),COLORRED;
DRAWTEXT_FIX(Z值<1.2,0.838,0.11,1,' ●重 警●'),COLORLIRED;
DRAWTEXT_FIX( BETWEEN(Z值,1.2,2.6),0.838,0.11,1,' ○轻 警○'),COLOR0099FF;
DRAWTEXT_FIX(Z值>2.6,0.838,0.11,1,' ◎无 警◎'),COLORLIGREEN;
LC:=REF(CLOSE,1);
WRSI:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;
获利筹码:=CONST(WINNER(C)*100);
SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));
量能饱和:=(IF(SAT>1,1,SAT)*100);
WR10:=(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3))*100;
活跃:=(WRSI-WR10);
活跃度比:=IF(活跃>=0,(活跃+100)/2,100-ABS((活跃-100)/2));
DRAWTEXT_FIX(1,0.74,0.15,1,STRCAT(STRCAT('量能饱和: ',CON2STR(量能饱和,2)),'%')),COLORYELLOW;
DRAWTEXT_FIX(1,0.74,0.35,1,STRCAT(STRCAT('活跃度比: ',CON2STR(活跃度比,2)),'%')),COLORYELLOW;
DRAWTEXT_FIX(1,0.74,0.55,1,STRCAT(STRCAT('获利筹码: ',CON2STR(获利筹码,2)),'%')),COLORYELLOW;
DRAWRECTREL(970,340,580,270,RGB(150,10,250));
DRAWRECTREL(970,470,580,540,RGB(150,10,250));
DRAWRECTREL(970,670,580,740,RGB(150,10,250));
DRAWRECTREL(970,340,580+CONST(量能饱和*(970-580)/100),270,RGB(0,100,0));
DRAWRECTREL(970,470,580+CONST(活跃度比*(970-580)/100),540,RGB(0,100,0));
DRAWRECTREL(970,670,580+CONST(获利筹码*(970-580)/100),740,RGB(0,100,0));
{DRAWTEXT_FIX(1,0.96,0.01,1,'大盘趋势:'),COLORRED;
DRAWTEXT_FIX( CONST(INDEXC) >SAR(4,2,20),0.95,0.16,1,'∧向上∧'),COLORRED;
{DRAWTEXT_FIX( CONST(INDEXC) >SAR(4,2,20),0.95,0.11,1,'∧∧∧∧'),COLORRED;}
{DRAWTEXT_FIX( CONST(INDEXC) <SAR(4,2,20),0.95,0.16,1,'∨向下∨'),COLORGREEN;
{DRAWTEXT_FIX( CONST(INDEXC) <SAR(4,2,20),0.95,0.11,1,'∨∨∨∨'),COLORGREEN;}
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.79,0.90,0,'财务数据日期是第:'),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.95,0.90,0,' 季度 ■ '),COLORRED;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.93,0.90,0,FINANCE(37)),COLORRED;
DRAWTEXT_FIX(1,0.58,0.78,0,FGBLOCK),COLORLICYAN;
{-----优秀-------}
ER1:=净资收益率>=13.58;
ER2:=主营利润率>=22.4;
ER5:=净利润比率>=19.42;
SAX1:=每股收益>=0.175;
SAX4:=每股未分配>=2.57;
SAX5:=每股公积金>=3.53;
DP3:=销售毛利率>=49.13;
ZL:=IF((EMA(WINNER(CLOSE)*70,3))>41 AND ISLASTBAR,1,0);
优秀:=ER1 AND ER2 AND ER5 AND SAX1
AND SAX4 AND SAX5 AND DP3 AND ZL ;
DRAWTEXT_FIX(1,0.97,0.01,1,'基本面评估:'),COLORRED;
DRAWTEXT_FIX(优秀 AND ISLASTBAR,0.95,0.11,1,'优秀'),COLORYELLOW;
{较好}
ER12:=净资收益率<13.59 AND 净资收益率>6.23;
ER22:=主营利润率>=8.34;
ER52:=净利润比率>=7.31;
SAX12:= 每股收益>=0.061;
SAX42:=每股未分配>=1.185;
SAX52:=每股公积金>1.62;
DP32:=销售毛利率>=28.68;
ZL1:=IF((EMA(WINNER(CLOSE)*70,3))>=11.26 AND ISLASTBAR,1,0);
{ER42:=主营业增长率>1; SAX22:=每股净资产>0.2; DP42:=换手率>0.5; WMF12:=量比>0.5;}
较好:=ER12 AND ER22 AND ER52 AND SAX12
AND SAX42 AND SAX52 AND DP32 AND ZL1;
DRAWTEXT_FIX(较好 AND ISLASTBAR,0.95,0.11,1,'较好'),COLORYELLOW;
{指标偏低}
ER偏低:=净资收益率<=0.27;
ER2偏低:=主营利润率<=-1.27;
ER3偏低:=净利润比率<=0.34;
SAX偏低:=每股收益<=0.002;
SAX2偏低:=每股未分配<=0.26;
SAX3偏低:=每股公积金<=0.39;
DP偏低:=销售毛利率<=4.2;{排名后100}
ZL偏低:=IF(((EMA(WINNER(CLOSE)*70,3))<2.81 AND ISLASTBAR),1,0);
偏低:=IF((ER偏低 OR ER2偏低 OR ER3偏低 OR SAX偏低
OR SAX2偏低 OR SAX3偏低 OR DP偏低 OR ZL偏低) AND ISLASTBAR=1,1,0) ;
DRAWTEXT_FIX( 偏低 AND ISLASTBAR=1 ,0.97,0.23,1,'有些指数偏低'),COLORYELLOW;
{一般};
一般:=IF((较好!=1 AND 优秀!=1 AND ZL偏低!=1 AND ISLASTBAR=1),1,0);
DRAWTEXT_FIX(一般 AND ISLASTBAR=1,0.95,0.11,1,'一般'),COLORYELLOW;

上一篇:通达信源码:三线共振,长牛排队,自用RSI副图指标

下一篇:通达信公式下载:底部十号,放心1号+多空策略+四红买涨,卧龙战法