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

通达信源码:主力增减仓,时来好运,波段神器

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

1、主力增减仓,对于主力资金一目了然

{主力增减仓------------------------}
 
C1:=10000*C/INDEXC;
O1:=10000*O/INDEXO;
主力动向:=MA(C1,5),LINETHICK2,COLOR666666;
水平线:0;
增减仓:C1-主力动向,NODRAW;
 
{主力增仓----}
STICKLINE(C1>=O1 AND C1>主力动向,增减仓,水平线,3,0),COLOR0000AA;
STICKLINE(C1>=O1 AND C1>主力动向,增减仓,水平线,2.5,0),COLOR0000BB;
STICKLINE(C1>=O1 AND C1>主力动向,增减仓,水平线,2,0),COLOR0000CC;
STICKLINE(C1>=O1 AND C1>主力动向,增减仓,水平线,1.5,0),COLOR0000DD;
STICKLINE(C1>=O1 AND C1>主力动向,增减仓,水平线,1,0),COLOR0000EE;
STICKLINE(C1>=O1 AND C1>主力动向,增减仓,水平线,0.5,0),COLOR0000FF;
WWW58188COM:=MA(C1,5),LINETHICK2,COLOR666666;
{主力减仓-----}
STICKLINE(C1<O1 AND C1<=主力动向,增减仓,水平线,3.0,0),COLOR009600;
STICKLINE(C1<O1 AND C1<=主力动向,增减仓,水平线,2.5,0),COLOR00A500;
STICKLINE(C1<O1 AND C1<=主力动向,增减仓,水平线,2.0,0),COLOR00B400;
STICKLINE(C1<O1 AND C1<=主力动向,增减仓,水平线,1.7,0),COLOR00C300;
STICKLINE(C1<O1 AND C1<=主力动向,增减仓,水平线,1.3,0),COLOR00D200;
STICKLINE(C1<O1 AND C1<=主力动向,增减仓,水平线,1.0,0),COLOR00E100;
STICKLINE(C1<O1 AND C1<=主力动向,增减仓,水平线,0.8,0),COLOR00F000;
STICKLINE(C1<O1 AND C1<=主力动向,增减仓,水平线,0.5,0),COLOR00FF00;
 
DRAWTEXT(CURRBARSCOUNT=1,0,STRCAT(STRCAT('      ',CON2STR(增减仓*100,0)),'')),COLORWHITE;



2、时来好运

MA1:MA(CLOSE,M1);
MA2:MA(CLOSE,M2);
MA3:MA(CLOSE,M3);
MA4:MA(CLOSE,M4);
MA5:MA(CLOSE,M5);
MA6:MA(CLOSE,M6);
MA7:MA(CLOSE,M7);
MA8:MA(CLOSE,M8);
MA9:MA(CLOSE,M9);
MA10:MA(CLOSE,M10);
VAR1:=1;
VAR3:=LLV(HIGH,240);
VAR4:=100*(CLOSE-VAR3)/VAR3*VAR1;
VAR5:=REF(LLV(CLOSE,480),1)*VAR1;
VAR6:=REF(HHV(CLOSE,480),1)*VAR1;
VAR7:=100*(CLOSE-VAR5)/(VAR6-VAR5)*VAR1;
VAR8:=(CLOSE-LLV(CLOSE,981))/(HHV(CLOSE,981)-LLV(CLOSE,981))*100*VAR1;
VAR9:=(CLOSE-LLV(CLOSE,393))/(HHV(CLOSE,393)-LLV(CLOSE,393))*100*VAR1;
VARA:=(CLOSE-LLV(LOW,981))/(HHV(HIGH,981)-LLV(LOW,981))*100*VAR1;
VARB:=(CLOSE-LLV(LOW,393))/(HHV(HIGH,393)-LLV(LOW,393))*100*VAR1;
VARC:=EMA(100*(CLOSE-LLV(LOW,100))/(HHV(HIGH,100)-LLV(LOW,100)),5)/4*VAR1;
VARD:=IF(VARC>23.16,VARC,0)*VAR1;
VARE:=VARC<1*VAR1;
VARF:=VARD*VAR1;
VAR10:=VAR4<0 AND VAR7<0;
VAR11:=1;
VAR12:=(HIGH+LOW+CLOSE*2)/4*VAR11;
VAR13:=EMA(VAR12,21);
VAR14:=STD(VAR12,21);
VAR15:=((VAR12-VAR13)/VAR14*100+200)/4*VAR11;
VAR16:=(EMA(VAR15,89)-25)*1.56*VAR11;
VAR17:=EMA(VAR16,5)*1.22*VAR11;
VAR18:=EMA(VAR17,3)*VAR11;
VAR19:=3*VAR17-2*VAR18*VAR11;
VAR1A:=IF(CROSS(VAR19,VAR17) AND CROSS(VAR19,VAR18) AND CROSS(VAR17,VAR18),1,0);
VAR1B:=IF(CROSS(VAR17,VAR19) AND CROSS(VAR18,VAR19) AND CROSS(VAR18,VAR17),1,0);
 
VAR1C:=EMA(100*(CLOSE-LLV(LOW,100))/(HHV(HIGH,100)-LLV(LOW,100)),13)/4*VAR1;
VAR1D:=EMA(CLOSE,2)-EMA(CLOSE,89)*VAR1;
VAR1E:=EMA(VAR1D,30)*VAR1;
VAR1F:=2*(VAR1D-VAR1E)*10*VAR1;
VAR20:=POW(VAR1F,3)*0.1+POW(VAR1F,2)*VAR1;
VAR21:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE));
VAR22:=EMA(VAR21*0.97,3)*VAR1;
VAR23:=(HIGH+LOW+CLOSE)/3*VAR1;
VAR24:=(VAR23-MA(VAR23,14))/(0.015*AVEDEV(VAR23,14))*VAR1;
VAR25:=IF(VAR1F>0.015,VAR20,0)/45*VAR1;
拉升资金:= VAR25,COLORRED;
VAR26:=EMA(CLOSE,2)-EMA(CLOSE,150);
VAR27:=EMA(VAR26,100);
VAR28:=2*(VAR26-VAR27);
VAR29:=POW(VAR28,3)*0.1+POW(VAR28,1);
VAR2A:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE));
VAR2B:=EMA(VAR2A*0.97,3);
VAR2C:=(HIGH+LOW+CLOSE)/3;
VAR2D:=(VAR2C-MA(VAR2C,14))/(0.015*AVEDEV(VAR2C,14));
主力资金:=IF(VAR28>0.1,VAR29,0)*5;
GZ:=拉升资金+主力资金;
拉升:=GZ>0 AND REF(GZ,1)=0;
DRAWTEXT(FILTER(拉升=1,3),LOW-0.05,'拉升'),COLORFF00FF;
LS:=C/REF(C,1)>1.048 AND C=H AND BETWEEN(FORCAST(V,4),0.2*FORCAST(V,12),2.1*FORCAST(V,12));
B:=FILTER(LS,28);
看板:=B AND COUNT(B,5)=1;
DRAWTEXT(看板,L*0.96, '追板'),COLORRED;
DRAWICON(看板,L*0.99,11);
TZ:=IF((BARSCOUNT(C) > 7),(100)*((MA(C,7))/(LLV(MA(C,7),7)) - 1),1);
N1:=IF((TZ > 0.35),6,65);
W:=((-((100)*(HHV(H,N1) - C))/(HHV(HIGH,N1) - LLV(L,N1))));
RV:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;
RG:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100;
J0:=(HIGH+LOW)/2;
QJ:=EMA(J0,3);
J1:=IF(CLOSE>QJ,VOL,0);
J2:=IF(CLOSE<QJ,VOL,0);
BB:=MA(SUM(J1-J2,22),3);
累加:=21*BB+20*REF(BB,1)+19*REF(BB,2)+18*REF(BB,3)+17*REF(BB,4)
+16*REF(BB,5)+15*REF(BB,6)+14*REF(BB,7)+13*REF(BB,8)+12*REF
(BB,9)+11*REF(BB,10)+10*REF(BB,11)+9*REF(BB,12)+8*REF(BB,13)
+7*REF(BB,14)+6*REF(BB,15)+5*REF(BB,16)+4*REF(BB,17)+3*REF
(BB,18)+2*REF(BB,19)+REF(BB,20);
WMA1:=累加/(21+1)/21*2;
CCZ:=WMA1;
VVAR3:=(BB-CCZ);
VVAR4:=SMA(RV,3,1);
VVAR5:=SMA(VVAR4,3,1);
KK:=EMA(SMA(RG,3,1),2);
DD:=SMA(KK,3,1);
涨停:=CROSS(W,-2) AND CROSS(VVAR4,VVAR5) AND CROSS(KK,DD);
抓涨停:=FILTER(涨停=1,3);
 
 
DIF1:=EMA(CLOSE,9)-EMA(CLOSE,19);
DEA:=EMA(DIF1,7);
MACD:=(DIF1-DEA)*2,COLORSTICK;
A2A:=BARSCOUNT(C);
AH:=HHV(H,200);
A1L:=LLV(L,200);
A0:=(AH-A1L)/190;
B1:=L-A0;
MACD2:=(EXPMA(CLOSE,30)-REF(EXPMA(CLOSE,30),1))/REF(EXPMA(CLOSE,30),1)*100;
DIF2:=EMA(SUM(MACD2,2),5);
DEA2:=MA(DIF2,5);
STICKLINE(抓涨停,B1,B1-0.2*A0,6,0)COLORYELLOW;
DRAWTEXT(抓涨停,H*0.94, '抓涨停'),COLORFF00FF;
DIF:=EMA(CLOSE,9)-EMA(CLOSE,19);
刹车点2:=((MACD2>0 AND DIF2>0) OR (MACD2>0.5 AND DIF2<0)) AND MACD2<REF(MACD2 ,1) AND REF(MACD2 ,1)>REF(MACD2 ,2)AND REF(MACD2 ,2)>REF(MACD2 ,3)AND REF(MACD2 ,3)>REF(MACD2 ,4);
刹车点1:=((MACD>0 AND DIF>0) OR (MACD>0.5 AND DIF<0)) AND MACD<REF(MACD ,1) AND REF(MACD ,1)>REF(MACD ,2)AND REF(MACD ,2)>REF(MACD ,3)AND REF(MACD ,3)>REF(MACD ,4);
刹车点A:=刹车点1 OR 刹车点2;
刹车点:=FILTER(刹车点A=1,3);
A01:=(A1L-AH)/190;
B12:=H-A01;
STICKLINE(刹车点,B12,B12+0.2*A01,4,0)COLORGREEN;
DRAWTEXT(刹车点,H*1.01, '刹车点'),COLORGREEN;
HH:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*REF(H,6)
+13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12)
+7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+
REF(H,20))/210,COLORBLUE,LINETHICK1;
LL:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6)
+13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12)
+7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+
REF(L,20))/210,COLORBLUE,LINETHICK1;
D90H:=EMA(HH,90),COLORRED,LINETHICK1;
D90L:=EMA(LL,90),COLORRED,LINETHICK1;
DGH:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*REF(H,6)
+13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12)
+7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+
REF(H,20))/210,COLORBLUE,LINETHICK1;DDL:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6)
+13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12)
+7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+
REF(L,20))/210,COLORBLUE,LINETHICK1;
D90C:=D90H-D90L;D90D:=D90H+D90C*2,COLORRED,LINETHICK1;
D90T:=D90L-D90C*2,COLORRED,LINETHICK1;
G0:=(REF(REF(H,25),25)-REF(REF(L,25),25))*1+REF(REF(H,25),25),LINETHICK1,COLORWHITE;
D0:=REF(REF(L,25),25)-(REF(REF(H,25),25)-REF(REF(L,25),25))*1,LINETHICK1,COLORWHITE;
DTD:=D0>=D90T AND G0>=D90D;
KTD:=G0<=D90D AND D0<=D90T;
ZDD:=D0>=D90T AND G0<=D90D;
BDD0:=(REF(REF(H,60),60)-REF(REF(L,60),60))*3+REF(REF(H,60),60),LINETHICK2,COLORGREEN;
BDT0:=REF(REF(L,60),60)-(REF(REF(H,60),60)-REF(REF(L,60),60))*3,LINETHICK2,COLORGREEN;
ZK1:=(REF(REF(H,25),25)-REF(REF(L,25),25))*1+REF(REF(H,25),25),DOTLINE,COLORBLUE;
ZD1:=REF(REF(L,25),25)-(REF(REF(H,25),25)-REF(REF(L,25),25))*1,DOTLINE,COLORRED,LINETHICK2;
ZK2:=EMA(ZK1,25);
ZD2:=EMA(ZD1,25),LINETHICK2;
GF:=ZD1>ZD2 AND L<ZD1 AND C<O;
JJ:=(HIGH+LOW+CLOSE)/3;
QJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(CLOSE,OPEN)),QJ0*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW)));
QJ2:=IF(CAPITAL=0,QJ0*(MIN(OPEN,CLOSE)-LOW),QJ0*IF(HIGH=LOW,1,(JJ-MIN(CLOSE,OPEN))));
QJ3:=IF(CAPITAL=0,QJ0*(HIGH-MAX(OPEN,CLOSE)),QJ0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));
QJ4:=IF(CAPITAL=0,QJ0*(MAX(CLOSE,OPEN)-JJ),QJ0*IF(HIGH=LOW,1,(MAX(CLOSE,OPEN)-JJ)));
DDX:=((QJ1+QJ2)-(QJ3+QJ4))/IF(CAPITAL=0,1000000,10000),COLOR00AAAA,LINETHICK;
V2:=SMA(IF(C>=REF(C,1),DDX,-DDX/100),2,1);
V5:=SMA(V2*240/FROMOPEN*0.9,5,1);
V10:=SMA(V5,5,1);
V20:=SMA(V10,5,1);
TT:=(V2*1.01-REF(V2,1));
TT2:=(REF(V2*1.01,1)-REF(V2,2));
YY:=TT>3*ABS(TT2);
TT1:=EMA(V2,15);
BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;  
N:=10;  
P:=3;
UPR:=BBI+P*STD(BBI,N);    
DWN:=BBI-P*STD(BBI,N);  
XF:=L<DWN;
潜伏:=GF AND XF;
进2:=TT>0  AND CROSS(TT,TT1) AND YY AND REF(潜伏,1);
UU:=BARSLAST(CROSS(ZD1,ZD2))<30;
时来运转2:=进2 AND UU;
STICKLINE(时来运转2,B1,B1-0.2*A0,4,0)COLORYELLOW;
 
DRAWTEXT(时来运转2,LOW*1,'时来运转'),COLORYELLOW;
A:=WINNER(C)*100;
R4阳:=REF(C,4)>REF(O,4);
R3阳:=REF(C,3)>REF(O,3);
R3阴:=REF(C,3)<REF(O,3);
R2阳:=REF(C,2)>REF(O,2);
R2阴:=REF(C,2)<REF(O,2);
R1阴:=REF(C,1)<REF(O,1);
R0阳:=C>O;
阳夹3阴:=R4阳 AND R3阴 AND R2阴 AND R1阴 AND R0阳;
阳夹2阴:= R3阳 AND R2阴 AND R1阴 AND  R0阳;
阳夹1阴:=R2阳 AND R1阴 AND R0阳;
XG2JIA1:=A>REF(A,2)  AND 阳夹1阴 AND C<REF(C,2);
XG3JIA2:=A>REF(A,3)  AND 阳夹2阴 AND C<REF(C,3);
XG4JIA3:=A>REF(A,4) AND 阳夹3阴 AND C<REF(C,4);
 
 
吸筹:=XG2JIA1 OR XG3JIA2 OR XG4JIA3;
 
STICKLINE(吸筹,LOW,OPEN,3,0),COLORBLUE;
STICKLINE(吸筹,C,OPEN,3,0),COLORYELLOW;




3、波段神器 波段粘合共振 波段神器选股

波段神器公式,准确地显示出股票的波段低点和高点,对于大家操盘买卖应该有帮助,另外结合《追魂黑马粘合》指标,可以捕捉到启动点。
波段神器指标含《波段神器》副图指标、《波段神器》进场选股指标、《波段粘合共振》选股指标,不加密、无未来。( 顶尖财经 股票学院: http://www.58188.com )

{波段神器}
VAR1B:=(HHV(HIGH,9)-CLOSE)/(HHV(HIGH,9)-LLV(LOW,9))*100-70;
VAR2B:=SMA(VAR1B,9,1)+100;
VAR3B:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
VAR4B:=SMA(VAR3B,3,1);
VAR5B:=SMA(VAR4B,3,1)+100;
VAR6B:=VAR5B-VAR2B;
趋势1: IF(VAR6B>45,VAR6B-45,0),COLOR00FFFF,LINETHICK2;
VAR2Q:=REF(LOW,1);
VAR3Q:=SMA(ABS(LOW-VAR2Q),3,1)/SMA(MAX(LOW-VAR2Q,0),3,1)*100;
VAR4Q:=EMA(IF(CLOSE*1.3,VAR3Q*10,VAR3Q/10),3);
VAR5Q:=LLV(LOW,30);
VAR6Q:=HHV(VAR4Q,30);
VAR7Q:=IF(MA(CLOSE,58),1,0);
VAR8Q:=EMA(IF(LOW<=VAR5Q,(VAR4Q+VAR6Q*2)/2,0),3)/999*VAR7Q;
火焰山:=IF(VAR8Q>100,100,VAR8Q);
STICKLINE(火焰山>0 AND 火焰山>REF(火焰山,1),0 ,火焰山*1.2,3.5,0 ),COLOR4444FF;
STICKLINE(火焰山>0 AND 火焰山>REF(火焰山,1),0 ,火焰山*1.2,2.5,0 ),COLOR5555FF;
STICKLINE(火焰山>0 AND 火焰山>REF(火焰山,1),0 ,火焰山*1.2,1.5,0 ),COLOR7777FF;
STICKLINE(火焰山>0 AND 火焰山>REF(火焰山,1),0 ,火焰山*1.2,0.5,0 ),COLOR9999FF;
STICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),3.5,0),COLOR000033;
STICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),2.8,0),COLOR000055;
STICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),2.0,0),COLOR000077;
STICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),1.2,0),COLOR000099;
STICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),0.4,0),COLOR0000DD;
STICKLINE(REF(趋势1,1)> 趋势1, 趋势1,REF(趋势1,1),3.5,0),COLOR003300;
STICKLINE(REF(趋势1,1)> 趋势1, 趋势1,REF(趋势1,1),2.8,0),COLOR005500;
STICKLINE(REF(趋势1,1)> 趋势1, 趋势1,REF(趋势1,1),2.0,0),COLOR007700;
STICKLINE(REF(趋势1,1)> 趋势1, 趋势1,REF(趋势1,1),1.2,0),COLOR009900;
STICKLINE(REF(趋势1,1)> 趋势1, 趋势1,REF(趋势1,1),0.4,0),COLOR00DD00;
逃顶:=CROSS(82,RSI);
STICKLINE( 逃顶,逃顶,10,3.5,0),COLORFF5500;
STICKLINE( 逃顶,逃顶,15,2.5,0),COLORFF8800;
STICKLINE( 逃顶,逃顶,20,1.5,0),COLORFFAA00;
STICKLINE( 逃顶,逃顶,25,0.5,0),COLORFFCC00;
STICKLINE( 逃顶,逃顶,30,0.1,0),COLORFFFF00;
D1:=(C+L+H)/3;
D2:=EMA(D1,6);
D3:=EMA(D2,5);
BBUY:=CROSS(D2,D3);
DRAWICON(BBUY,20,1);
DRAWTEXT(BBUY,趋势1+13,'进场'),COLORYELLOW;
VARR1:=SMA(MAX(CLOSE-REF(C,1),0),6,1)/SMA(ABS(CLOSE-REF(C,1)),6,1)*100;
DRAWICON(CROSS(82,VARR1),10,15);
DRAWTEXT(CROSS(82,VARR1),35,'逃'),COLORYELLOW;
 

{波段粘合共振}
B:=MA(CLOSE,17)+MA(CLOSE,17)-REF(MA(CLOSE,17),1);
分水岭:=IF(MA(CLOSE,17)<B,B,MA(CLOSE,17));
操作线:=分水岭-(EMA(C,3)-分水岭);
MA1:=EMA(CLOSE,5);
MA2:=EMA(CLOSE,10);
MA3:=EMA(CLOSE,20);
MA4:=EMA(CLOSE,30);
三线粘合剑:=CROSS(分水岭,操作线) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018 AND CROSS(MA1,MA4) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018 AND CROSS(MA2,MA3) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018 OR CROSS(MA1,MA3) AND C>O AND C>REF(C,1) AND C/REF(C,1)>=1.018;
D1:=(C+L+H)/3;
D2:=EMA(D1,6);
D3:=EMA(D2,5);
进场:=CROSS(D2,D3);
波段粘合共振:三线粘合剑 AND 进场;
 
{波段神器选股}
D1:=(C+L+H)/3;
D2:=EMA(D1,6);
D3:=EMA(D2,5);
进场:CROSS(D2,D3);

上一篇:通达信源码:恶魔的眼泪,MACD周期共鸣,分钟多空

下一篇:通达信公式下载:主力资金流向,波段控盘信号,蒂纳黄金K线