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

通达信源码:压力支撑,跳空高开未回调,分时买卖点

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

1、压力支撑

跟通常的支撑压力公式相比,增加背景红进绿出和解盘功能
出现绿色背景柱就出来 出现红色背景柱就观察买进( 顶尖财经 股票学院: http://58188.com )

{压力支撑}
买线:=EMA(C,1);
卖线:=EMA(SLOPE(C,10)*10+C,20);
STICKLINE(买线>=卖线,REFDATE(HHV(H,0),DATE),REFDATE(LLV(L,0),DATE),6,0),COLOR3333CC;
STICKLINE(买线<卖线,REFDATE(HHV(H,0),DATE),REFDATE(LLV(L,0),DATE),6,0),COLOR008B00;
DRAWKLINE(H,O,L,C);{波段淡红青K线}
STICKLINE(买线>=卖线,C,O,3,0),COLOR000045;
STICKLINE(买线>=卖线,C,O,2,0),COLOR000085;
STICKLINE(买线>=卖线,C,O,1,0),COLOR0000C5;
STICKLINE(买线>=卖线,C,O,0.3,0),COLOR0000E5;
STICKLINE(买线>=卖线,L,H,0,0),COLOR0000FF;
STICKLINE(买线<卖线,L,H,0,0 ),COLORFFFF00;
STICKLINE(买线<卖线,C,O,3.1,0 ),COLOR000000;
STICKLINE(买线<卖线,C,O,2.1,0 ),COLOR6A6A00;
STICKLINE(买线<卖线,C,O,1.5,0 ),COLORDDDD00;
STICKLINE(买线<卖线,C,O,0.3,0),COLORFFFF00;
DRAWICON(CROSS(买线,卖线),L,42);
DRAWICON(CROSS(卖线,买线),H,43);
XG1:=C/REF(C,1)>1.05;
STICKLINE(XG1,L,H,0,0),COLOR0088EE;
STICKLINE(XG1,CLOSE,OPEN,3,0),COLOR000000;
STICKLINE(XG1,CLOSE,OPEN,2.2,0),COLOR0088DD;
STICKLINE(XG1,CLOSE,OPEN,1.2,0),COLOR00AAFF;
STICKLINE(XG1,CLOSE,OPEN,0.3,0),COLOR00FFFF;
均价:=(3*C+H+L+O)/6;
VAR1:=(8*均价+7*REF(均价,1)+6*REF(均价,2)+5*REF(均价,3)+
4*REF(均价,4)+3*REF(均价,5)+2*REF(均价,6)+REF(均价,8))/36;
VAR2:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;
SZ1:=REF(VAR1,1)=REF(VAR2,1) AND VAR1>VAR2 AND CLOSE>VAR1;
SZ2:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>REF(VAR2,1)
AND H/VAR1<1.1 AND L>VAR2 AND CLOSE>VAR1;
SZ3:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>=REF(VAR2,1) AND H/VAR1>1.1;
SZ4:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>REF(VAR2,1)
AND CLOSE>VAR2 AND CLOSE<VAR1;
SZ5:=(VAR1>VAR2 AND VAR2>REF(VAR2,1) AND VAR1<>REF(VAR1,1)
AND CLOSE<VAR2) OR (VAR1>VAR2 AND VAR1<REF(VAR1,1)
AND VAR2<REF(VAR2,1) AND CLOSE<VAR2);
SZ6:=REF(VAR1,1)>REF(VAR2,1) AND VAR1=VAR2 AND CLOSE<VAR2;
XD1:=VAR1=VAR2 AND CLOSE<VAR2 OR (VAR1<REF(VAR1,1) AND VAR2<REF(VAR2,1)
AND REF(VAR1,1)=REF(VAR2,1) AND CLOSE<VAR2);
XD2:=VAR1=VAR2 AND CLOSE>VAR1;
SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));
量能饱和度:=IF(SAT>1,1,SAT)*100;
DRAWTEXT_FIX(BARSTATUS=2 AND SZ1,0.8,0.05,0,'调整结束短线介入'),COLORFFFFFF;
DRAWTEXT_FIX(BARSTATUS=2 AND SZ2,0.8,0.05,0,'上升通道走势良好'),COLORFFFFFF;
DRAWTEXT_FIX(BARSTATUS=2 AND SZ3,0.8,0.05,0,'股价偏离注意调整'),COLORFFFFFF;
DRAWTEXT_FIX(BARSTATUS=2 AND SZ4,0.8,0.05,0,'上升通道调整洗盘'),COLORFFFFFF;
DRAWTEXT_FIX(BARSTATUS=2 AND SZ5,0.8,0.05,0,'转向特征注意离场'),COLOR00FFFF;
DRAWTEXT_FIX(BARSTATUS=2 AND SZ6,0.8,0.05,0,'通道改变坚决离场'),COLORFFFF00;
DRAWTEXT_FIX(BARSTATUS=2 AND XD1,0.8,0.05,0,'下跌通道只宜观望'),COLORFFFF00;
DRAWTEXT_FIX(BARSTATUS=2 AND XD2,0.8,0.05,0,'短期底部准备进入'),COLORYELLOW;
RSV:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
RSV24:=(CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100;
K24:=SMA(RSV24,3,1);
D24:=SMA(K24,3,1);
J24:=3*K24-2*D24;
压力位:IF(CROSS(J24,J),H,REF(H,BARSLAST(CROSS(J24,J)))),DOTLINE,COLORRED;
支撑位:IF(CROSS(J,J24),L,REF(L,BARSLAST(CROSS(J,J24)))),DOTLINE,COLOR77AAFF;
HH:=CONST(HHV(C,0));
LL:=CONST(LLV(C,0));
HL:=HH-LL;
顶:HH,NODRAW;
DRAWICON(C=HH,HH,45);
DRAWICON(C=LL,LL,44);
{前期机构:=STRCAT(STRCAT('前期 机构(家): ',CON2STR(FINONE(246,0,331),0)),STRCAT(' 持股数(股): ',CON2STR(FINONE(247,0,331),0)));
本期机构:=STRCAT(STRCAT('本期 机构(家): ',CON2STR(FINONE(246,0,0),0)),STRCAT(' 持股数(股): ',CON2STR(FINONE(247,0,0),0)));
DRAWTEXT_FIX(ISLASTBAR,0,0,0,前期机构),COLORFFFFFF;
DRAWTEXT_FIX(ISLASTBAR,0,0.05,0,本期机构),COLORFFFFFF;
前期股东:=STRCAT('前期 十大流东股东持股 合计 : ',CON2STR(FINONE(264,0,331),0));
本期股东:=STRCAT('本期 十大流东股东持股 合计: ',CON2STR(FINONE(264,0,0),0));
DRAWTEXT_FIX(ISLASTBAR,0,0.1,0,前期股东),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0,0.15,0,本期股东),COLORYELLOW;};



2、跳空高开未回调,通达信副图和选股公式

N:=10;
ZT:=1;
A1:=H>=REF(C,1)*1.098 AND L>REF(H,1)AND C/REF(C,1)>1.05 AND C/O>0.98;
 {跳空高开且触及涨停} ;
A2:=BARSLAST(A1);
{上次跳空并且触及涨停距离现在的天数} 
A3:=EVERY(L>REF(H,A2+1),A2);
{至今未回补缺口 };
A4:=EXIST(A1,N) AND A3;
{N日内存在跳空触及涨停未回补}
A5:=C>=REF(C,1)*1.098 AND L>REF(H,1)AND C/O>0.98;
{跳空高开且涨停 } A6:=BARSLAST(A5);
{上次跳空且真实涨停距离现在的天数A2} 
A7:=EVERY(L>REF(H,A6+1),A6);
 {至今未回补跳空并真实涨停形成的缺口}
A8:=EXIST(A5,N) AND A7;  
{N日内存在跳空真实涨停未回补}
B1:=BARSCOUNT(C)>50 AND L>REF(H,1) AND C/O>=1.03; 
{跳空收阳}
B2:=C>MA(C,50) AND C>MA(C,120);
C1:=B2 AND (A4 OR A8);
C2:=B2 AND (A4 OR A8 OR B1);
XG:IF(ZT=1,C1,C2);
{ZT=1,只选跳空涨停,ZT=0,加选跳空收阳,涨幅>3%};



3、分时买卖点,组合的通达信分时公式

{分时买卖点} 
AA1:=(VOL/CLOSE)/3;
AA2:=SUM((IF(((AA1>40) AND (CLOSE>(REF(CLOSE,1)))),AA1,0)),0);
AA3:=SUM((IF(((AA1>40) AND (CLOSE<(REF(CLOSE,1)))),AA1,0)),0);
AA4:=SUM((IF(((AA1<40) AND (CLOSE>(REF(CLOSE,1)))),AA1,0)),0);
AA5:=SUM((IF(((AA1<40) AND (CLOSE<(REF(CLOSE,1)))),AA1,0)),0);
AA6:=((AA2+AA3)+AA4)+AA5;
AA7:=IF((BARSTATUS=2),((100*AA2)/AA6),0);
AA8:=((IF((BARSTATUS=2),((100*AA3)/AA6),0)));
AA9:=((IF((BARSTATUS=2),((100*AA4)/AA6),0)));
AA10:=((IF((BARSTATUS=2),((100*AA5)/AA6),0)));
机买:=(AA2),LINETHICK0;
机卖:=(AA3),LINETHICK0;
散买:=(AA4);
散卖:=(AA5);
总买:=AA2+AA4;
总卖:=AA3+AA5;
机构买比:=机买/总买*0.1,LINETHICK0;
机构卖比:=机卖/总卖*0.1,LINETHICK0;
 
均价:SUM(C*V,240)/SUM(V,240),COLORYELLOW,LINETHICK1;
TT:=BARSCOUNT(C);
前高:=REF(HHV(H,TT),1);
突破:=CROSS(C,REF(HHV(H,TT),1)){ AND HHVBARS(VOL,TT)=0} AND C/均价<1.09 AND TT>1  AND TT<240;
DRAWTEXT(CROSS(C,REF(HHV(H,TT),1)) AND {HHVBARS(VOL,TT)=0  AND} C/均价<1.09 AND TT>=1 AND  TT<240 ,前高, '←突'),COLORRED;
 
主力扫盘:=COUNT(突破,13)>=3 AND CROSS(C,REF(HHV(H,TT),1)){ AND HHVBARS(VOL,TT)=0};
DRAWTEXT(主力扫盘,前高, '←扫盘'),COLORYELLOW;
 
{已主力扫盘:=BARSLAST(主力扫盘)<13;
DRAWTEXT(BARSLAST(主力扫盘)<8,(DYNAINFO(3))*9.5/10 , '↖已扫'),COLORGREEN;}
 
全仓买进:=CROSS(C,REF(HHV(H,TT),1)) AND HHVBARS(VOL,TT)=0 AND C/均价<1.09 AND TT>1  AND TT<240  AND BARSLAST(主力扫盘)>=21;
 
DRAWTEXT(全仓买进 ,前高, '←全仓'),COLORCYAN;
 
VAR1:=EMA(EMA(C,13),13);
控盘:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;
JJ:=DYNAINFO(11);
P:=55;
S:=8;
M1:=3;
能量:=(EMA(C,S)-EMA(C,P))*10;
空头:=EMA(能量,M1);
BTJ11:=(C-JJ)/JJ<-0.03;
BTJ2:=控盘>REF(控盘,1) AND 控盘<-0.2;
BTJ3:=CROSS(能量,空头) AND 能量<-0.3;
BTJ811:=FILTER(BTJ11 AND BTJ2 AND BTJ3,13);
有庄:=BTJ811;
DRAWTEXT(BTJ811,C*0.999,'←有庄'),COLORRED;
 
H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
阻力:L1+P1*7/8,COLORGREEN,LINETHICK9;
支撑:L1+P1*0.5/8,COLORYELLOW,LINETHICK9;
{DRAWICON(LONGCROSS(支撑,C,2),C,25);
DRAWICON(LONGCROSS(C,阻力,2),C,27);}
 
{资金流入:=SUM(IF(C>REF(C,1),C*V,0),FROMOPEN);
资金流出:=-SUM(IF(C<REF(C,1),C*V,0),FROMOPEN);
净资金:=(资金流入+资金流出)/10000;
 
{DRAWTEXT_FIX(1,0.700,1-0.15,0,STRCAT(STRCAT('【净买】',CON2STR(净资金,1)),'万')),COLORRED;}
 
KP:=DYNAINFO(4);
ZX:=DYNAINFO(7);
 
 
{分时量}
 
{分时K}
ZS:=DYNAINFO(3);
ZG:=DYNAINFO(5);
ZD:=DYNAINFO(6);
OP:=500-(KP/ZS-1)*1200;
CL:=500-(ZX/ZS-1)*1200;
HI:=500-(ZG/ZS-1)*1200;
LO:=500-(ZD/ZS-1)*1200;
{N1:=IF(TIME2<125959,750,260);{360,860}
N1:=IF(FROMOPEN>=120,250,750);
Z1:=IF(ZX>=KP,255,0);
Z2:=IF(ZX>=KP,0,255);
Z3:=IF(ZX>=KP,0,255);
 
XA_1:=MAX(DYNAINFO(3),DYNAINFO(5));
XA_2:=MIN(DYNAINFO(3),DYNAINFO(6));
XA_3:=XA_1-XA_2;
XA_4:=XA_2+XA_3*7/8;
XA_5:=XA_2+XA_3*0.5/8;
DRAWTEXT(LONGCROSS(XA_5,CLOSE,2),CLOSE,'★买入'),COLORMAGENTA;
DRAWICON(LONGCROSS(XA_5,CLOSE,2),CLOSE,25);
DRAWTEXT(LONGCROSS(CLOSE,XA_4,2),CLOSE,'★卖出'),COLORFFCC00;
DRAWICON(LONGCROSS(CLOSE,XA_4,2),CLOSE,24);
XA_6:=DYNAINFO(4);
XA_7:=DYNAINFO(5);
XA_8:=DYNAINFO(6);
XA_9:=DYNAINFO(11);
XA_10:=CLOSE;
XA_11:=BARSCOUNT(XA_10);
XA_12:=SUM(VOL*CLOSE,0)/SUM(VOL,0);
XA_13:=MA(XA_10,XA_11);
XA_14:=XA_13+2*STD(XA_10,3);
XA_15:=XA_13-2*STD(XA_10,3);
DRAWICON(CROSS(XA_12,XA_13),XA_12,38);
XA_16:=TIME>93000;
XA_17:=XA_10/REF(CLOSE,1)>1.02;
XA_18:=XA_10/REF(CLOSE,1)<0.98;
XA_19:=(HHV(XA_10,XA_11)-LLV(XA_10,XA_11))/XA_10<0.05;
XA_20:=SMA(VOL,30,1);
XA_21:=(XA_20-LLV(LLV(XA_20,1),30))/(HHV(HHV(XA_20,1),30)-LLV(LLV(XA_20,1),30))>0.95;
XA_22:=XA_17 OR XA_18;
XA_23:=XA_22=0 AND XA_19 AND XA_21 AND CROSS(XA_12,XA_13);
DRAWTEXT(FILTER(XA_23,10),XA_12,506),COLORYELLOW;
XA_24:=XA_22=0 AND XA_19 AND XA_21 AND CROSS(CLOSE,XA_12) AND CROSS(CLOSE,XA_13);
DRAWTEXT(FILTER(XA_24,10),XA_12*0.99,507),COLORRED;
 
MA5:MA.MA1#DAY(5,10,20),NODRAW;
DRAWTEXT_FIX(1,0.880,1-0.20,0,STRCAT(STRCAT('MA5:  ',CON2STR(MA5,2)),'')),COLORWHITE;
MA10:MA.MA2#DAY(5,10,20),NODRAW;
DRAWTEXT_FIX(1,0.880,1-0.15,0,STRCAT(STRCAT('MA10:',CON2STR(MA10,2)),'')),COLORYELLOW;
MA20:MA.MA3#DAY(5,10,20),NODRAW;
DRAWTEXT_FIX(1,0.880,1-0.10,0,STRCAT(STRCAT('MA20:',CON2STR(MA20,2)),'')),COLORMAGENTA;
MA60:MA.MA4#DAY(5,10,20),NODRAW;
DRAWTEXT_FIX(1,0.880,1-0.05,0,STRCAT(STRCAT('MA60:',CON2STR(MA60,2)),'')),COLORGREEN;
 
攻击量:=((HSL*0.50+REF(HSL,1)*0.33)+(REF(HSL,2)*0.17))*SUM(C,FROMOPEN)/FROMOPEN;
攻击量A:=SUM(IF(C>REF(C,1),攻击量*V,0),FROMOPEN),COLOR0000FF,LINETHICK0;
攻击量B:=-SUM(IF(C<REF(C,1),攻击量*V,0),FROMOPEN),COLOR00FF00,LINETHICK0;
攻击流量:=攻击量A+攻击量B,COLORSTICK;
攻击比:=攻击流量/SUM(V,FROMOPEN)*100,COLORRED,LINETHICK1;
资金攻击度:=IF(攻击比>=0,(攻击比+50),100-ABS((攻击比-50)));
资金流入:=SUM(IF(C>REF(C,1),V,0),FROMOPEN),STICK,COLORRED;
资金流出:=-SUM(IF(C<REF(C,1),V,0),FROMOPEN),STICK,COLOR00FF00;
资金出入:=资金流入+资金流出,COLORSTICK;
资金比:=资金出入/SUM(V,FROMOPEN)*100,COLOR00FFFF,LINETHICK1;
资金流量比:=IF(资金比>=0,(资金比+100)/2,100-ABS((资金比-100)/2));
DRAWTEXT_FIX(1,0.200,0.87,0,STRCAT(STRCAT('资金流量比',CON2STR(资金流量比,2)),'%买')),COLORCYAN;
DRAWTEXT_FIX(1,0.000,0.87,0,STRCAT(STRCAT('资金攻击度',CON2STR(资金攻击度,2)),' %买')),COLORCYAN;
 
A1:=SUM(IF(CLOSE>REF(CLOSE,1),VOL/CAPITAL*100,IF(CLOSE<REF(CLOSE,1),-VOL/CAPITAL*100,0)),0);
成交额:=V*C/100,NODRAW;
A2:=SUM((IF(((成交额/8>20) AND (CLOSE>(REF(CLOSE,1)))),成交额,0)),0);
A3:=SUM((IF(((成交额/8>20) AND (CLOSE<(REF(CLOSE,1)))),成交额,0)),0);
A4:=SUM((IF(((成交额/8<20) AND (CLOSE>(REF(CLOSE,1)))),成交额,0)),0);
A5:=SUM((IF(((成交额/8<20) AND (CLOSE<(REF(CLOSE,1)))),成交额,0)),0);
A6:=((A2+A3)+A4)+A5;
A7:=IF((ISLASTBAR),((100*A2)/A6),0);
A8:=IF((ISLASTBAR),((100*A3)/A6),0);
A9:=IF((ISLASTBAR),((100*A4)/A6),0);
A10:=IF((ISLASTBAR),((100*A5)/A6),0);
 
DD1:=1;
AAA1:=STRCAT(STRCAT('机构买入',CON2STR((100*A2)/A6,0)),'%');
AAA2:=STRCAT(STRCAT('机构卖出',CON2STR((100*A3)/A6,0)),'%');
AAA0:=STRCAT(STRCAT('机构总买入',CON2STR((100*(A2-A3))/A6,0)),'%');
AAA3:=STRCAT(STRCAT('散户买入',CON2STR((100*A4)/A6,0)),'%');
AAA4:=STRCAT(STRCAT('散户卖出',CON2STR((100*A5)/A6,0)),'%');
AAA5:=STRCAT(STRCAT('散户总买入',CON2STR((100*(A4-A5))/A6,0)),'%');
DRAWTEXT_FIX(DD1=1,0.000,1.00,0,AAA1),COLORRED;
DRAWTEXT_FIX(DD1=1,0.150,1.00,0,AAA2),COLORGREEN;
DRAWTEXT_FIX(DD1=1,0.300,1.00,0,AAA3),COLORRED;
DRAWTEXT_FIX(DD1=1,0.450,1.00,0,AAA4),COLORGREEN;
DRAWTEXT_FIX(DD1=1,0.600,1.00,0,AAA0),LINETHICK5,COLORYELLOW;
DRAWTEXT_FIX(DD1=1,0.750,1.00,0,AAA5),LINETHICK5,COLORCYAN;

上一篇:通达信源码:牛股分时,智能解盘很准,RM3线一线阴线

下一篇:通达信源码:金色60分钟,短线买卖,短线买进