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

通达信源码精选:神买神卖 顶底趋势 龙腾虎跃

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

神买神卖 顶底趋势 龙腾虎跃,三个公式配合使用效果奇佳,公式无未来函数
 
神买神卖 顶底趋势 龙腾虎跃 三个公式介绍:
突破前高颈线和岛形反转主图 合适现在熊市行情,结合成交量放大和macd底背离,做超短线还是很不错。
除了主图标识,另外还有相应的突破前高和岛形反转时的跳空高开副图公式,
当出现信号时,结合量能和macd判断,效果很不错哦!( 股民学院: http://www.58188.com )
无未来函数
 
{神买神卖}
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26); {选股设JC=10即可} 
DEA:=EMA(DIFF,9); 
MACD:=2*(DIFF-DEA); 
A:=IF(CROSS(0,DEA),1,0); 
A1:=IF(DIFF<0 AND CROSS(DIFF,DEA),1,0); 
SS:=IF(A,SUM(A1,0),0); 
SSB:=HHV(SS,0); 
SSS:=SUM(A1,0); 
W底选股:IF(SSS-SSB=2 AND SSS>REF(SSS,1),-22,0),LINETHICK2,COLORFFFF00;
IF(SSS-SSB=2 AND SSS>REF(SSS,1),-12,0),LINETHICK2,COLORFFFF00;
DRAWTEXT(A1,-10,'W底'),COLORYELLOW;
N:=20;
MID:=MA(C,N);
VART1:=POW((C-MID),2);
VART2:=MA(VART1,N);
VART3:=SQRT(VART2);
UPPER:=MID+2*VART3;
LOWER:=MID-2*VART3;
BOLL:=REF(MID,1);
UB:=REF(UPPER,1);
LB:=REF(LOWER,1);
LOWER1:=MID-VART3;
LB1:=REF(LOWER1,1);
股价线:(C-LB1)/(UB-LB)*100,COLORGREEN, LINETHICK1;
趋势线:MA(股价线,6),COLORRED, LINETHICK3;
90,COLORGREEN, LINETHICK1;
50,COLORWHITE, LINETHICK1;
0,COLORWHITE, LINETHICK1;
VARC:=SMA(ABS(L-REF(L,1)),3,1)/SMA(MAX(L-REF(L,1),0),3,1); 
准备建仓:EMA(IF(L<= LLV(L,30),VARC,0),3),COLORFF00FF,LINETHICK2;
VARO5:=LLV(LOW,27);
VARO6:=HHV(HIGH,34);
VARO7:=EMA((CLOSE-VARO5)/(VARO6-VARO5)*4,4)*25;
建仓区: IF((VARO7<10),80,100) ,COLORFFFF00,LINETHICK3;
IF((VARO7<10),85,100) ,COLORBLACK,LINETHICK2;
 
下单:IF(CROSS(3*SMA((CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100,5,1),3,1),10),38,0),STICK ,COLORYELLOW, LINETHICK4;
DRAWTEXT(下单,40,'下单'),COLORGREEN;
BIAS1:=(C-MA(C,6))/MA(C,6)*100;
BIAS2:=(C-MA(C,12))/MA(C,12)*100;
BIAS3:=(C-MA(C,24))/MA(C,24)*100;
BIAS:=(BIAS1+2*BIAS2+3*BIAS3)/6;
乖离1:=MA(BIAS,3);
低买:IF(CROSS(BIAS,乖离1) AND 乖离1<-9,28,0),COLORRED,LINETHICK2;
IF(CROSS(BIAS,乖离1) AND 乖离1<-9,18,0),COLORRED,LINETHICK2;
STICKLINE(CROSS(BIAS,乖离1) AND 乖离1<-9,-12,0,8,0),COLORYELLOW;
DRAWTEXT(低买,33,'低买'),COLORRED;
TTR:=SUM(MAX(MAX((HIGH - LOW),ABS((HIGH - REF(CLOSE,1)))),ABS((LOW - REF(CLOSE,1)))),5);
HD:=(HIGH - REF(HIGH,1));
LD:=(REF(LOW,1) - LOW);
DMP:=(SUM(IF(((HD > 0) AND (HD > LD)),HD,0),5) );
DMM:=SUM(IF(((LD > 0) AND (LD > HD)),LD,0),5);
神偷线:=(((DMP ) * 100) /TTR);
辅助线:=((DMM * 100) /TTR);
动向趋势线:=(MA(((ABS((辅助线 - 神偷线)) / (辅助线 + 神偷线)) * 100),3));
ADXR:=((动向趋势线 + REF(动向趋势线,3)) / 2);
VAR3:=MA(CLOSE,2);
VAR7:=REF(VAR3,1);
【强弱】:=((SMA(MAX((VAR3 - VAR7),0),5,1) / SMA(ABS((VAR3 - VAR7)),5,1)) * 100);
准备:(IF(((动向趋势线 > 88) AND (神偷线 < 5.8)),68,0)),LINETHICK1,COLORFF00FF;
(IF(((动向趋势线 > 88) AND (神偷线 < 5.8)),48,0)),LINETHICK1,COLORFF00FF;
DRAWTEXT(准备,60,'准备'),COLORFF00FF;
TYP := (HIGH + LOW + CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*500-250;
K:=SMA(RSV,3,1);
LC := REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*500-250;
X:CROSS(CCI,-100)  AND K<-100 ;
X改成:CROSS(CCI,-100)  AND K<-100 AND CROSS(RSI1,-90);
MA2:=EMA(C,2);MA5:=EMA(C,5);
MA13:=EMA(C,13);
MA34:=EMA(C,34);
MA55:=EMA(C,55);
YCX:=MA5>=REF(MA5,1);
H1:=MAX(MAX(MA5,MA13),MA34);
L1:=MIN(MIN(MA5,MA13),MA34);
一阳穿三线:= H1<C AND O<L1 AND YCX AND MA2>REF(MA2,1);
满仓选股:IF(一阳穿三线,88,0),COLORFFFF00,LINETHICK2;
IF(一阳穿三线,58,0),COLORFFFF00,LINETHICK2;
DRAWTEXT(一阳穿三线,88,'满仓'),COLORYELLOW;
VAR2:=0.0001*AMOUNT,;
MA1:=0.0001*MA(AMOUNT,5);
M2:=0.0001*MA(AMOUNT,10);
百日地量:(VAR2,100)=VAR2,STICK,COLORRED,LINETHICK0;
DRAWTEXT(百日地量,-12,'地量'),COLORRED;
VAR1:=(CLOSE*2+HIGH+LOW)/4;
SK:= EMA(VAR1,13)-EMA(VAR1,73);
SD:= EMA(SK,2);
买点选股:(CROSS(SK,SD) AND SK<-0.04 AND (C-REF(C,1))/REF(C,1)>=0.03)
OR (CROSS(SK,SD) AND SK<=-0.14 ) OR (CROSS(SK,SD) AND SK<=0.05 
AND (V/MA(V,5)>2 OR C/REF(C,1)>0.035));
IF(买点选股,28,0),COLORYELLOW,LINETHICK2;
IF(买点选股,18,0),COLORYELLOW,LINETHICK2;
DRAWTEXT(买点选股,28,'买点'),COLORYELLOW;
AA05:=MA(C,5);
五日乖离率:=(C-AA05)/AA05*100;
BB05:=ATAN((AA05/REF(AA05,1)-1)*100)*180/3.1416;
速度5:=SMA(EMA((AA05-REF(AA05,1))/REF(AA05,1),3)*100,3,1);
加速度5:=EMA((速度5-REF(速度5,1)),3);
AA10:=MA(C,10);AA20:=MA(C,20);
BB10:=ATAN((AA10/REF(AA10,1)-1)*100)*180/3.1416;
AA30:=MA(C,30);
三拾日乖离率:=(C-AA30)/AA30*100;
(AA20-AA30)>REF((AA20-AA30),1) AND AA20>REF(AA20,1) AND AA30>REF(AA30,1); 
(AA30-AA20)<REF((AA30-AA20),1) AND AA20<REF(AA20,1) AND AA30<REF(AA30,1); 
BB30:=ATAN((AA30/REF(AA30,1)-1)*100)*180/3.1416;
强势狙击选股:FILTER(BB30>30 AND BB10>45 AND CROSS(BB05,60),10);
加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 AND AA05>REF(AA05,1)  AND 三拾日乖离率>REF(三拾日乖离率,1) AND AA10>REF(AA10,1)
AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1)  ,10) ;
MR:=COUNT(CROSS(五日乖离率,0),3)>=1 AND 三拾日乖离率>REF(三拾日乖离率,1) AND AA05>REF(AA05,1) AND (C/REF(C,1)-1)*100>5 AND REF(C,1)<AA30;
青云直上选股:IF(FILTER(MR,10),30,0),COLORGREEN,LINETHICK2;
IF(FILTER(MR,10),20,0),COLORGREEN,LINETHICK2;
DRAWTEXT(青云直上选股,30,'青云直上'),COLORGREEN;
VVT1:=(DMA(CLOSE,VOL/SUM(VOL,13)))/DMA(CLOSE,VOL/SUM(VOL,13))*100<=-28 AND (CLOSE-DMA(CLOSE,VOL/SUM(VOL,34)))/DMA(CLOSE,VOL/SUM(VOL,34))*100<=-19;
VVT2:=IF((((HIGH > (LOW * 1.051)) AND (COUNT((HIGH > (LOW * 1.051)),5) > 1)) AND ((((CLOSE / MA(CLOSE,40)) * 100) < 78) OR 
(((CLOSE / MA(CLOSE,60)) * 100) < 74))),2,0);
VVT3:=(SMA(MAX(C-REF(C,2),0),7,1)/SMA(ABS(C-REF(C,2)),7,1)*100)<15;
VVT4:=REF(SMA((CLOSE-LLV(LOW,8))/
(HHV(HIGH,8)-LLV(LOW,8))*100,2,1),1)<REF(SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,2,1),2);
VVT5:=SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,2,1)>REF(SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,2,1),1);
VVT6:=IF(VVT5 AND VVT4 AND SMA((CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100,2,1)<23 ,1.5,0);
QUANCLOSE:=VVT1 AND C/REF(C,25)<=1.1 AND VVT2 AND VVT3 AND VVT6 AND FILTER((C/MA(C,48))<0.75 AND (C/MA(C,70))<0.70 AND 
((C-L)/C>0.02 OR C>REF(C,1)*1.01) AND V<REF(V,1)*2.8 AND (COUNT(C<O*0.93,2)=2 OR COUNT(H/L>1.1,5)>3),3)  ; 
{这上面的10行源码修改好,新版通达信也可以测试通过}
DRAWTEXT(QUANCLOSE,88,'弱市百发百中'),COLORFFFF00;
IF(QUANCLOSE,88,0),COLORFFFF00,LINETHICK2;
IF(QUANCLOSE,60,0),COLORFFFF00,LINETHICK2;
AA:=1;
BB:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
CC:=IF(AMOUNT/C/HHV(AMOUNT,9)/HHV(C,9)*100>100,100,AMOUNT/C/HHV(AMOUNT,9)/HHV(C,9)*100);
DD:=CC/BB;
量异动:IF(AA,DD/REF(DD,1),0);
STICKLINE(量异动>=0,0,量异动,8,0);
STICKLINE(量异动>=0,0,量异动,4,0);
选股:DD/REF(DD,1);
CROSS(-100*(HHV(HIGH,55)-CLOSE)/(HHV(HIGH,55)-LLV(LOW,55)),-45)
AND CLOSE>SMA(CLOSE,60,5) AND SMA(CLOSE,23,5)>REF(SMA(CLOSE,23,5),1) 
AND SMA(SMA((CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100,13,1),23,1)>REF(SMA(SMA((CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100,13,1),23,1),1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
逃顶:CROSS(80,RSI)*88,LINETHICK2 ,COLORGREEN;
CROSS(80,RSI)*58,LINETHICK2 ,COLORGREEN;
DRAWTEXT(CROSS(80,RSI),88,'逃顶 '),COLORGREEN;
CROSS(-100*(HHV(HIGH,55)-CLOSE)/(HHV(HIGH,55)-LLV(LOW,55)),-45)
AND CLOSE>SMA(CLOSE,60,5) AND SMA(CLOSE,23,5)>REF(SMA(CLOSE,23,5),1) 
AND SMA(SMA((CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100,13,1),23,1)>REF(SMA(SMA((CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100,13,1),23,1),1)COLORBLUE,LINETHICK2;
W1:=C=HHV(C,20); 
W2:=BARSLAST(W1); 
W3:=IF(W2>0,REF(C,W2),REF(C,W2)); 
W4:=CROSS(C,REF(W3,1)); 
W4 AND COUNT(W4,5)=1; ;
 
 
{牛熊线}
重心线:=(H+L+O+C*3)/6;
NX:=(3*CLOSE+LOW+OPEN+HIGH)/6;    
牛线:=(20*NX+19*REF(NX,1)+18*REF(NX,2)+17*REF(NX,3)+16*REF(NX,4)    
+15*REF(NX,5)+14*REF(NX,6)+13*REF(NX,7)+12*REF(NX,8)+11*REF(NX,9)    
+10*REF(NX,10)+9*REF(NX,11)+8*REF(NX,12)+7*REF(NX,13)+6*REF(NX,14)    
+5*REF(NX,15)+4*REF(NX,16)+3*REF(NX,17)    
+2*REF(NX,18)+REF(NX,20))/210;
WWW58188COM:DRAWNULL,COLORRED;
牛熊线:MA(牛线,6),COLORGREEN,LINETHICK2;
IF(牛熊线<=牛线,牛熊线,DRAWNULL),COLORRED,LINETHICK3;
 
 
{趋势顶底}
VARE:=REF(LOW,1)*0.9;
VARF:=LOW*0.9;
VAR10:=(VARF*VOL+VARE*(CAPITAL-VOL))/CAPITAL;
VAR11:=EMA(VAR10,30);
VAR12:=VAR11-CLOSE;
VAR13:=REF(CLOSE,1);
VAR14:=SMA(MAX(CLOSE-VAR13,0),7,1)/SMA(ABS(CLOSE-VAR13),7,1)*100;
VAR15:=SMA(MAX(CLOSE-VAR13,0),13,1)/SMA(ABS(CLOSE-VAR13),13,1)*100;
VAR16:=BARSCOUNT(CLOSE);
VAR17:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100;
VAR18:=((-100)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+50)*2;
VAR19:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;
VAR1A:=(SMA(VAR19,4,1)-50)*2;
VAR1B:=SMA(VAR1A,3,1);
VAR1C:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100;
VAR1D:=SMA(VAR1C,4,1);
VAR1E:=SMA(VAR1D,3,1);
VAR1F:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;
VAR20:=IF(VAR17<=25 AND VAR18<-95 AND VAR1F>20 AND VAR1B<-30 AND VAR1E<30 AND VAR12>=-0.25 AND VAR14<22 AND VAR15<28 AND VAR16>50,100,0),LINETHICK3,COLORYELLOW ;
极限反击:= VAR20;
STICKLINE (极限反击>0,1,89,1.3,0),COLORGREEN;
STICKLINE (极限反击>0,3,87,0.00001,0),COLORBLACK;
W:80,COLOR996699;
S:20,COLORGREEN;
Y:10,COLORCC6633,LINETHICK2;
T:90,COLOR9966FF,LINETHICK2;
A:=MA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),19),COLORRED;
B:=-100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14));
D:=EMA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),4),LINETHICK2;
长期线:A+100,COLOR9900FF;
短期线:B+100,COLOR888888;
中期线:D+100,COLORYELLOW,LINETHICK2;
见顶:(REF(中期线,1)>85 AND REF(短期线,1)>85 AND REF(长期线,1)>65) AND CROSS(长期线,短期线) ;
顶区:(中期线<REF(中期线,1) AND REF(中期线,1)>80) AND (REF(短期线,1)>95 OR REF(短期线,2)>95 ) AND 长期线>60 AND 短期线<83.5
AND 短期线<中期线 AND 短期线<长期线+4,COLORRED;
顶部:FILTER(顶区,4);
底区:(长期线<12 AND 中期线<8 AND (短期线<7.2 OR REF(短期线,1)<5) AND (中期线>REF(中期线,1) OR 短期线>REF(短期线,1)))
OR (长期线<8 AND 中期线<7 AND 短期线<15 AND 短期线>REF(短期线,1)) OR (长期线<10 AND 中期线<7 AND 短期线<1),COLORYELLOW ;
STICKLINE(顶部,99,103,4,1 ),COLORRED,LINETHICK2;
STICKLINE( 底区,-4,0,4,0 ),COLORGREEN;
低位金叉:=长期线<15 AND REF(长期线,1)<15 AND 中期线<18 AND 短期线>REF(短期线,1) AND CROSS(短期线,长期线) AND 短期线>中期线 
AND (REF(短期线,1)<5 OR REF(短期线,2)<5 ) AND (中期线>=长期线 OR REF( 短期线,1)<1 );
STICKLINE( 低位金叉,0,5,4,0 ),COLORRED;
DRAWICON (CROSS(长期线,中期线) ,0,2);
DRAWICON(CROSS(中期线,长期线),0,1);
STICKLINE( 见顶,99.5,102.5,3,0 ),COLORGREEN;
STICKLINE( 见顶,100.5,101.5,1.5,0 ),COLORRED;
VAR111:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
VAR222:=EMA(VAR111,30);
VAR333:=EMA(VAR222,30);
VAR444:=3*VAR222-2*VAR333;
势:=EMA(VAR444,5),COLORBLUE,LINETHICK3;
持币:IF(势<REF(势,1),-5,DRAWNULL),CIRCLEDOT,COLORGREEN;
持股:IF(势>REF(势,1),-5,DRAWNULL),CIRCLEDOT,COLOR000099;
 
 
{龙腾虎跃}
N:=8;
坐标线:0;20;50;80;100;
龙腾四海:100-100*(HHV(HIGH,5*N)-CLOSE)/(HHV(HIGH,5*N)-LLV(LOW,5*N)),COLOR00FFFF;
海面:20,COLORGREEN;
海天分界线:50,COLORYELLOW;
天际:80,COLORRED;

上一篇:通达信源码精选:调整结束,犀牛一号,严重超买超卖

下一篇:通达信源码精选:五彩K线,立体3D K线,自动黄金分割