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

通达信源码:压力支撑自动划线,量王擒庄,财务评分排序

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

压力支撑自动划线:

{压力支撑画线}

{压力支撑画线}
{ N:1,100,8    P:0,1,0}
ZGD:=HHV(H,60);
ZGD2:=CONST(ZGD);
ZDD:=LLV(L,60);
ZDD2:=CONST(ZDD);
GJ:=(C+H+L+O)/4;
明日阻力:=L+(GJ-L)+(C-L);
明日支撑:=L+(C-GJ);
KOH:=L>REF(H,1);
KOL:=H<REF(L,1);
HIF:=L>REF(H,BARSLAST(KOH)+1);
NHIF:=L<=REF(H,BARSLAST(KOH)+1);
LIF:=H<REF(L,BARSLAST(KOL)+1);
NLIF:=H>=REF(L,BARSLAST(KOL)+1);
下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100);
RRRSV:=SMA(下档线,3,1);
KKK:=SMA(RRRSV,3,1);
DDDDD:=((3 * RRRSV) - (2 * KKK));
JJ12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);
RSV24:=SMA(JJ12,3,1);
K24:=SMA(RSV24,3,1);
D24:=((3 * RSV24) - (2 * K24));
压力2:=IF(CROSS(D24,DDDDD),HIGH,REF(HIGH,BARSLAST(CROSS(D24,DDDDD)))),COLORFFFFFF;
底部:=LLV(HIGH,30),COLOR00FF00;
AA:=REF(H,N)=HHV(H,2*N+1);  AA1:=REF(L,N)=LLV(L,2*N+1);
QY:=BACKSET(AA,N+1);  QY1:=BACKSET(AA1,N+1);
CC:=FILTER(QY,N) AND H=HHV(H,N+1);  CC1:=FILTER(QY1,N) AND L=LLV(L,N+1);
DDD:=BARSLAST(CC);  DD1:=BARSLAST(CC1);
GDTS:=IF(CC,CURRBARSCOUNT,0);  DDTS:=IF(CC1,CURRBARSCOUNT,0);
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);  DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
GDCS1:=CONST(DINGBUTS);  DDCS1:=CONST(DDTS1);
GDCS13:=CONST(REF(HIGH,GDCS1-1));  DDCS13:=CONST(REF(L,DDCS1-1));
DINGBUTS1:=REF(DINGBUTS,DDD+1);  DDTS2:=REF(DDTS1,DD1+1);
GDCS2:=CONST(DINGBUTS1);  DDCS2:=CONST(DDTS2);
GDCS23:=CONST(REF(HIGH,DINGBUTS1-1));  DDCS23:=CONST(REF(L,DDTS2-1));
XG1:=BACKSET(ISLASTBAR,GDCS1);  XD1:=BACKSET(ISLASTBAR,DDCS1);
XG2:=BACKSET(ISLASTBAR,DINGBUTS1);  XD2:=BACKSET(ISLASTBAR,DDTS2);
XDD:=IF(DDCS13<=DDCS23,XD1,XD2);
BCG:=SUM(XG1,0);  BCD:=SUM(XDD,0);
今日阻力:REF(明日阻力 , 1),NODRAW;
今日支撑:REF(明日支撑 , 1),NODRAW;
压力位:IF(ISLASTBAR,压力2,DRAWNULL),NODRAW;
底部位:IF(ISLASTBAR,底部,DRAWNULL),NODRAW;
高点压力:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) ,COLORGREEN,LINETHICK2;
低点支撑:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1),COLORBLUE,LINETHICK2;
高:=CONST(MAX(MAX(MAX(ZGD2,高点压力),GDCS13),GDCS23));
低:=CONST(MIN(MIN(MIN(ZDD2,DDCS23),DDCS13),低点支撑));
ZGSTAR:=(高点压力+低点支撑)/2;
ZGEND:=CONST((高点压力+低点支撑)/2);
STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);
中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLOR555555,LINETHICK2;
M:=INTPART(3*N/5);
AAA:=REF(H,M)=HHV(H,2*M+1);
QYY:=BACKSET(AAA,M+1);
CCC:=FILTER(QYY,M) AND H=HHV(H,M+1);
DDDD:=BARSLAST(CCC),NODRAW;
GDTSS:=IF(CCC,CURRBARSCOUNT,0);
DINGBUTSS:=IF(DDDD,REF(GDTSS,DDDD),GDTSS);
GDCS11:=CONST(DINGBUTSS);
DINGBUTS11:=REF(DINGBUTSS,DDDD+1);
GDCS22:=CONST(DINGBUTS11);
上缺口:=P=0 AND HIF AND BARSLAST(KOH)<BARSLAST(NHIF)
AND BARSLAST(HIF)<BARSLAST(NHIF);
HG:=IF(上缺口,REF(H,BARSLAST(KOH)+1),DRAWNULL);
STICKLINE(上缺口,HG,HG*1.001,10,0),COLOR888888;
下缺口:=P=0 AND LIF AND BARSLAST(KOL)<BARSLAST(NLIF) AND BARSLAST(LIF)
<BARSLAST(NLIF);
LG:=IF(下缺口,REF(L,BARSLAST(KOL)+1),DRAWNULL);
STICKLINE(下缺口,LG,LG*0.999,10,0),COLOR888888;
高点压力M:DRAWLINE(CURRBARSCOUNT=GDCS22,H,CURRBARSCOUNT=GDCS11,H,1),COLORRED,LINETHICK1;
AA11:=REF(L,M)=LLV(L,2*M+1);
QY11:=BACKSET(AA11,M+1);
CC11:=FILTER(QY11,M) AND L=LLV(L,M+1);
DD11:=BARSLAST(CC11);
DDTSS:=IF(CC11,CURRBARSCOUNT,0);
DDTS11:=IF(DD11,REF(DDTSS,DD11),DDTSS);
DDCS11:=CONST(DDTS11);
DDTS22:=REF(DDTS11,DD11+1);
DDCS22:=CONST(DDTS22);
低点支撑M:DRAWLINE(CURRBARSCOUNT=DDCS22,L,CURRBARSCOUNT=DDCS11,L,1) COLORRED,LINETHICK1;
STICKLINE(XG2,GDCS23,GDCS23,0.5,1),COLORWHITE;
STICKLINE(XG1,GDCS13,GDCS13,0.5,1),COLORYELLOW;
STICKLINE(XD2,DDCS23,DDCS23,0.5,1),COLORMAGENTA;
STICKLINE(XD1,DDCS13,DDCS13,0.5,1),COLORCYAN;
STICKLINE(ISLASTBAR AND C>=今日阻力,今日阻力,今日阻力,10,1),COLOR0000FF;
STICKLINE(ISLASTBAR AND C<今日阻力,今日阻力,今日阻力,10,1),COLOR00FF00;
STICKLINE(ISLASTBAR AND C>=今日支撑,今日支撑,今日支撑,10,1),COLORFF00FF;
STICKLINE(ISLASTBAR AND C<今日支撑,今日支撑,今日支撑,10,1),COLORFF8800;
STICKLINE(ISLASTBAR ,压力位,压力位,120,0),COLORFFFFFF;
STICKLINE(ISLASTBAR ,底部位,底部位,100,0),COLOR00FF00;




量王擒庄:

量王擒庄介绍:根据个股放天量,主力强力洗盘,把浮筹洗出去,换下一个主力,
属短线操作,买入后第二天不封涨停卖出,不适合大仓位操作。( 顶尖财经 股票学院: http://www.58188.com )

本公式同时适合手机版



{量王擒庄}

NN:=2;
AM1:=MA(AMOUNT,5),COLORWHITE;
AM2:=MA(AMOUNT,10),COLORYELLOW;
AM3:=MA(AMOUNT,250),COLORGREEN;
地量:=MA(AMOUNT,5) = LLV(MA(AMOUNT,5),250),COLORBLUE;
天量:=AMOUNT = HHV(AMOUNT,0),COLORYELLOW;
倍量:=AMOUNT / REF(AMOUNT,1) > 2 AND NOT(天量),COLORMAGENTA;
爆量:=VOL / REF(MA(VOL,5),1) > 3,COLORWHITE;
堆量:=MA(AMOUNT,5) / MA(AMOUNT,250),COLORGREEN;
量比:=VOL / REF(MA(VOL,5),1),COLORRED;
换手:=VOL / CAPITAL,COLORCYAN;
倍量2:=AMOUNT / REF(AMOUNT,1) >  2;
爆量2:=VOL / REF(MA(VOL,5),1) >3;
量王:AMOUNT AND 倍量2 AND 爆量2 AND 天量,LINETHICK0;




财务评分排序:

{财务评订}
{主图显示财务评分与评级(可粘贴到自己喜欢的主图)}
 
净资产收益率:=FINANCE(33)/FINANCE(34)*100,NODRAW;
每股净资产:=FINANCE(34),NODRAW;
每股未分配利润:=FINANCE(32),NODRAW;
主营收入占比:=FINANCE(20)/(FINANCE(20)+FINANCE(22)+FINANCE(24)+FINANCE(25))*100,NODRAW;
每股经营现金流:=FINANCE(25)/FINANCE(1),NODRAW;
现金流利润比:=FINANCE(25)/FINANCE(29),NODRAW;
每股总现金流:=FINANCE(26)/FINANCE(1),NODRAW;
股价现金流比:=FINANCE(1)*C/FINANCE(25),NODRAW;
销售毛利率:=FINANCE(21)/FINANCE(20)*100,NODRAW;
价值估值PEG:(C/FINANCE(33))/(FINANCE(21)/FINANCE(20)+0.038)/100,NODRAW;
每股公积金:=FINANCE(18),NODRAW;
AB1:=IF(现金流利润比>0.5,1+现金流利润比/1000,现金流利润比/1000),NODRAW;
AB21:=IF(主营收入占比>50,1+主营收入占比/1000,主营收入占比/1000),NODRAW;
AB31:=IF(净资产收益率>5,1+净资产收益率/1000,净资产收益率/1000),NODRAW;
A41:=IF(每股净资产>1.5,1+每股净资产/100,每股净资产/100),NODRAW;
A51:=IF(股价现金流比>0 AND 股价现金流比<80,1+股价现金流比/1000,0),NODRAW;
A61:=IF(每股未分配利润>0.2,1+每股未分配利润/1000,每股未分配利润/1000),NODRAW;
A71:=IF(销售毛利率>10,1+销售毛利率/1000,销售毛利率/1000),NODRAW;
A81:=IF(价值估值PEG<1,1,0),NODRAW;
综合得分:AB1+AB21+AB31+A41+A51+A61+A71+A81,NODRAW;
DRAWTEXT_FIX(1,0.62,0,0,' 财务评分:')COLORRED;
DRAWTEXT_FIX(1,0.68,0,0, CON2STR(综合得分,3))COLOR00FFFF;
DRAWTEXT_FIX(1,0.82,0,0,' 财务评级:')COLORRED;
DRAWTEXT_FIX( 综合得分<5 AND 综合得分<8,0.90,0,0,'差')COLOR00FFFF;
DRAWTEXT_FIX(1,0.82,0,0,' 财务评级:')COLORRED;
DRAWTEXT_FIX(综合得分>=5 AND  综合得分<8,0.90,0,0,'一般')COLOR00FFFF;
DRAWTEXT_FIX( 综合得分<8.25 AND 综合得分>=8,0.90,0,0,'良好')COLOR00FFFF;
DRAWTEXT_FIX( 综合得分>8.25,0.90,0,0,'优秀')COLOR00FFFF;
 
 
{财务优秀}
{选股}
净资产收益率:=FINANCE(33)/FINANCE(34)*100;
每股净资产:=FINANCE(34);
每股未分配利润:=FINANCE(32);
主营收入占比:=FINANCE(20)/(FINANCE(20)+FINANCE(22)+FINANCE(24)+FINANCE(25))*100;
每股经营现金流:=FINANCE(25)/FINANCE(1);
现金流利润比:=FINANCE(25)/FINANCE(29);
每股总现金流:=FINANCE(26)/FINANCE(1);
股价现金流比:=FINANCE(1)*C/FINANCE(25);
销售毛利率:=FINANCE(21)/FINANCE(20)*100;
价值估值PEG:=(C/FINANCE(33))/(FINANCE(21)/FINANCE(20)+0.038)/100;
每股公积金:=FINANCE(18);
AB1:=IF(现金流利润比>0.5,1+现金流利润比/1000,现金流利润比/1000);
AB21:=IF(主营收入占比>50,1+主营收入占比/1000,主营收入占比/1000);
AB31:=IF(净资产收益率>5,1+净资产收益率/1000,净资产收益率/1000);
A41:=IF(每股净资产>1.5,1+每股净资产/100,每股净资产/100);
A51:=IF(股价现金流比>0 AND 股价现金流比<80,1+股价现金流比/1000,0);
A61:=IF(每股未分配利润>0.2,1+每股未分配利润/1000,每股未分配利润/1000);
A71:=IF(销售毛利率>10,1+销售毛利率/1000,销售毛利率/1000);
A81:=IF(价值估值PEG<1,1,0);
综合得分:=AB1+AB21+AB31+A41+A51+A61+A71+A81;
优秀:综合得分>8.25;
 
 
{财务良好}
{选股}
净资产收益率:=FINANCE(33)/FINANCE(34)*100;
每股净资产:=FINANCE(34);
每股未分配利润:=FINANCE(32);
主营收入占比:=FINANCE(20)/(FINANCE(20)+FINANCE(22)+FINANCE(24)+FINANCE(25))*100;
每股经营现金流:=FINANCE(25)/FINANCE(1);
现金流利润比:=FINANCE(25)/FINANCE(29);
每股总现金流:=FINANCE(26)/FINANCE(1);
股价现金流比:=FINANCE(1)*C/FINANCE(25);
销售毛利率:=FINANCE(21)/FINANCE(20)*100;
价值估值PEG:=(C/FINANCE(33))/(FINANCE(21)/FINANCE(20)+0.038)/100;
每股公积金:=FINANCE(18);
AB1:=IF(现金流利润比>0.5,1+现金流利润比/1000,现金流利润比/1000);
AB21:=IF(主营收入占比>50,1+主营收入占比/1000,主营收入占比/1000);
AB31:=IF(净资产收益率>5,1+净资产收益率/1000,净资产收益率/1000);
A41:=IF(每股净资产>1.5,1+每股净资产/100,每股净资产/100);
A51:=IF(股价现金流比>0 AND 股价现金流比<80,1+股价现金流比/1000,0);
A61:=IF(每股未分配利润>0.2,1+每股未分配利润/1000,每股未分配利润/1000);
A71:=IF(销售毛利率>10,1+销售毛利率/1000,销售毛利率/1000);
A81:=IF(价值估值PEG<1,1,0);
综合得分:=AB1+AB21+AB31+A41+A51+A61+A71+A81;
良好:综合得分>8 AND 综合得分<8.25;
 

上一篇:通达信源码:解剖主力主图,四量图,分时主力买卖

下一篇:通达信源码:动态筹码 筹码主图 彩色筹码,经纬操盘线