文章目录:
- 1、通达信选股公式源码
- 2、通达信扫雷宝指标公式
- 3、如何读取通达信财务数据
通达信选股公式源码
你好,通达信选股公式源码如下。
次日涨停
W1:=C=HHV(C,20);
W2:=BARSLAST(W1);
W3:=IF(W20,REF(C,W2),REF(C,W2));
W4:=交叉(C,REF(W3,1));
W4和计数(W4,5)=1;
黄转紫选股
差异:=EMA(DCLOSE,12)-EMA(DCLOSE,26);
DEA:=EMA(差异,9);
MACD:=(DIFF-DEA)*2;
紫柱:MACDREF(MACD,1)和REF(MACD,1)低位金叉选股
差异:=EMA(DCLOSE,12)-EMA(DCLOSE,26);
DEA:=EMA(差异,9);
MACD:=(DIFF-DEA)*2;
低位金叉:交叉(差异,DEA)和差异二次金叉选股
差异:=EMA(DCLOSE,12)-EMA(DCLOSE,26);
DEA:=EMA(差异,9);
MACD:=(DIFF-DEA)*2;
JCCOUNT:=计数(交叉(差异,数据包络分析),BARSLAST(数据包络分析=0));
二次金叉:交叉(差异,DEA)和DEA绝地反弹
(1)
VAR1:=参考值(低,1);
VAR2:=SMA(ABS(低VAR1),13,1)/SMA(最大值(低VAR1,0),13,1)*100;
VAR3:=EMA(如果(关闭*1.2,VAR2*13,VAR2/13),13);
VAR4:=LLV(低,34);
VAR5:=HHV(VAR3,34);
VAR6:=如果(LLV(低,55),1,0);
VAR7:=EMA(如果(低)XL1:=MA(低,2)*0.96;
XL2:=MA(低,26)*0.85;
XL3:=REF(XL1,1)启动:=如果(XL3,0,VAR7*3),则为红色;
XG:启动25;
(2)
倒退((参考(关闭,1)关闭打开和ABS(关闭参考(关闭,1))/关闭A2:=过滤器(A1ND资本REF(V,1)=LLV(V,4)和V=REF(V,1)
HHV(V,3)=参考(V,1)和HHV(V,5)=参考(V,1)和HHV(V,21)=参考(V,1)
和V=REF(V,1)
010,T020;
1.三线粘合
M:=1;
M5:=MA(闭合,5);
M10:=MA(闭合,10);
M20:=MA(闭合,20);
K1:=最大值(最大值(M5,M10),最大值(M10,M20));
K2:=MIN(MIN(M5,M10),MIN(M10,M20));
A:=最大(M5,最大(M10,M20))/MIN(M5,最小(M10,M20))A1:=(K1/K2-1)A2:=(K1/K2-1)A3:=VREF(V,1)*1.5和VMA(V,5);
XG:A和A1,A2和A3,CO和VREF(V,1),资本2.三条线粘合
N1:=5;N2:=10;N3:=20;M:=1;
MA1:=MA(C,N1);MA2:=MA(C,N2);MA3:=MA(C,N3);
A3:=VREF(V,1)*1.5和VMA(V,5);
最大值(MA1,最大值(MA2,MA3))/MIN(MA1,最小值(MA2,MA3))CO和VREF(V,1)和财务(7)A3及资本3.均线粘合
M:=1;
M5:=MA(闭合,5);
M10:=MA(闭合,10);
M20:=MA(闭合,20);
K1:=最大值(最大值(M5,M10),最大值(M10,M20));
K2:=MIN(MIN(M5,M10),MIN(M10,M20));
A:=最大(M5,最大(M10,M20))/MIN(M5,最小(M10,M20))A1:=(K1/K2-1)A2:=(K1/K2-1)A3:=VREF(V,1)*1.5和VMA(V,5);
XG:A和A1以及A2和A3;
3.金叉选股指标
快线:=均线(均线)(均线(收盘,2,2,2),;
慢线:=EMA(参考(快线,1),2);
A3:=VREF(V,1)*1.5和VMA(V,5);
交叉(快线,慢线) 和CO和
五 =MA(V,21)和VREF(V,1),资本
通达信扫雷宝指标公式
通达信扫雷宝指标公式:
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);
流通市值:=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.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);
销售毛利率:=((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);
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(33));
每股现金流:=CONST((FINANCE(25)/FINANCE(1)));
每股未分配:=CONST(FINANCE(32));
每股公积金:=CONST(FINANCE(18));
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.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;
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;
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(SAT1,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(1,0.87,0.85,1,'股联盟'),COLORYELLOW;
如何读取通达信财务数据
方法一:通过按F10来获取,这样获取的信息量大,但劳动强度大,不用于快速运算选股。
方法二:利用通达信函数来获取相关财务数据,通达信提供的财务函数如下:
4.3.2财务数据函教
FINANCE(N) 返回财务数据
N 定义 单位 N 定义 单位 N 定义 单位
1 总股本 万股 14 长期投资 千元 27 上年损益调整 千元
2 国家股 千元 15 流动负债 千元 28 利润总额 千元
3 发起人法人股 万股 16 长期负债 千元 29 税后利润 千元
4 法人股 万股 17 资本公积金 千元 30 净利润 千元
5 B股 万股 18 每股公积金 千元 31 未分配利润 千元
6 H股 万股 19 股东权益 千元 32 每股未分配 元
7 流通A股 万股 20 主营收入 千元 33 每股收益 元
8 职工股 万股 21 主营利润 千元 34 每股净资产 元
9 A2转配股 万股 22 其他利润 千元 35 调每股净资 元
10 总资产 万股 23 营业利润 千元 36 流通市值
11 流动资产 千元 24 投资收益 千元 40 股东权益比 元
12 固定资产 千元 25 补贴收入 千元 41 总市值 元
13 无形资产 千元 26 营业外收支 千元 42 上市日期
R(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(1,0.87,0.85,1,'股联盟'),
OR0099FF;DRAWTEXT_FIX(Z值2.6,0.838,0.11,1,' ◎无 警◎'),COLORLIGREEN;LC:=REF(CLOSE,1);WRSI:=SMA(MAX
LC),5,1)*100;获利筹码:=CONST(WINNER(C)*100);SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));量能饱和:=(IF(SAT1,