当前位置: 网站首页 > 股票软件公式 > 同花顺公式 > 文章 当前位置: 同花顺公式 > 文章

同花顺源码:主力清仓,小杨斜率抓牛股,自创高抛低吸

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

主力清仓:

大机构仓位:100*(1-WINNER(CLOSE)),colorlired,LINETHICK3;

VAR2:=1/WINNER(CLOSE);
VAR3:=MA(CLOSE,13);
VAR4:=100-ABS((CLOSE-VAR3)/VAR3*100);
VAR5:=LLV(LOW,120);
VAR6:=HHV(HIGH,120);
VAR7:=(VAR6-VAR5)/100;
VAR8:=SMA((CLOSE-VAR5)/VAR7,20,1);
VAR9:=SMA((OPEN-VAR5)/VAR7,20,1);
VARA:=3*VAR8-2*SMA(VAR8,10,1);
VARB:=3*VAR9-2*SMA(VAR9,10,1);
VARC:=100-VARB;
基金私募仓位: (100-VARA),coloryellow,LINETHICK2;
VARE:=REF(LOW,1)*0.9;
VARF:=LOW*0.9;
VAR10:=(VARF*VOL+VARE*(CAPITAL-VOL))/CAPITAL;
VAR11:=EMA(VAR10,30);
VAR12:=CLOSE-REF(CLOSE,1);
VAR13:=MAX(VAR12,0);
VAR14:=ABS(VAR12);
VAR15:=SMA(VAR13,7,1)/SMA(VAR14,7,1)*100;
VAR16:=SMA(VAR13,13,1)/SMA(VAR14,13,1)*100;
VAR17:=BARSCOUNT(CLOSE);
VAR18:=SMA(MAX(VAR12,0),6,1)/SMA(ABS(VAR12),6,1)*100;
VAR19:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100;
VAR1A:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;
VAR1B:=SMA((SMA(VAR1A,4,1)-50)*2,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:=VAR18<=25 AND VAR19<-95 AND VAR1F>20 AND VAR1B<-30 AND VAR1E<30 AND VAR11-CLOSE>=-0.25 AND VAR15<22 AND VAR16<28 AND VAR17>50;
VAR21:=(HIGH+LOW+CLOSE)/3;
VAR22:=(VAR21-MA(VAR21,14))/(0.015*AVEDEV(VAR21,14));
VAR23:=(VAR21-MA(VAR21,70))/(0.015*AVEDEV(VAR21,70));
VAR24:=IF(VAR22>=150 AND VAR22<200 AND VAR23>=150 AND VAR23<200,10,0);
VAR25:=IF(VAR22<=-150 AND VAR22>-200 AND VAR23<=-150 AND VAR23>-200,-10,VAR24);
STICKLINE(VAR20,0,80,5,0),LINETHICK4,colorred;
DRAWTEXT(CROSS(VAR20,0.5) AND COUNT(VAR20=1,10)=1,90,'超级主力建仓!') , colorred;
VAREX:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VARFX:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA
((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR10X:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA
((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR11X:=VARFX<REF(VAR10X,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);
DRAWTEXT(VAR11X AND COUNT(VAR11X,30)=1,70,'大资金进场'),LINETHICK1,colorcyan;
STICKLINE(VAR11X AND COUNT(VAR11X,30)=1,1,60,5,0),colorcyan,LINETHICK4;
V1:=(C*2+H+L)/4*10;
V2:=EMA(V1,13)-EMA(V1,34);
V3:=EMA(V2,5);
V4:=2*(V2-V3)*5.5;
V5:=(HHV(INDEXH,8)-INDEXC)/(HHV(INDEXH,8)-LLV(INDEXL,8))*8;
V6:=EMA(3*V5-2*SMA(V5,18,1),5);
V7:=(INDEXC-LLV(INDEXL,8))/(HHV(INDEXH,8)-LLV(INDEXL,8))*10;
V8:=(INDEXC*2+INDEXH+INDEXL)/4;
V9:=EMA(V8,13)-EMA(V8,34);
VA:=EMA(V9,3);
VB:=(V9-VA)/2;
V11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);
V12:=(EMA(V11,3)-REF(EMA(V11,3),1))/REF(EMA(V11,3),1)*100;
AA:=(EMA(V11,3)<=13) AND FILTER((EMA(V11,3)<=13),15);
买入股票: STICKLINE(EMA(V11,3)<=13 AND V12>13,0,50,5,0),LINETHICK3,colorred;
BB:= (EMA(V11,3)<=13 AND V12>13) AND FILTER((EMA(V11,3)<=13 AND V12>13),10);
DRAWTEXT (BB,60,'主力进'),colorwhite;
卖临界: STICKLINE(EMA(V11,3)>60 AND EMA(V11,3)>REF(EMA(V11,3),1),100,95,15,1),colorgreen;
CC:=(EMA(V11,3)>=90 AND V12) AND FILTER((EMA(V11,3)>=90 AND V12),10);
DD:=(EMA(V11,3)>=120 AND V12) AND FILTER((EMA(V11,3)>=120 AND V12),10);
STICKLINE(IF(VB>=0,VB,0) AND EMA(V11,3)<13,0,15,5,0),colorlired;
STICKLINE(IF(VB<=0,VB,0) AND EMA(V11,3)>90,0,10,10,0),colorgreen;
STICKLINE( IF(V4>=0,V4,1) AND EMA(V11,3)<13,0,15,5,0),colorlired;
STICKLINE(IF(V4<=0,V4,1) AND EMA(V11,3)>90,0,10,10,0),colorligreen,LINETHICK1;
DRAWTEXT (CC,20,'主力减仓'),colorligreen;
V10:=PEAKBARS(3,15,1)<10;
V12X:=IF(V10=1,50,0);
头部:= IF(V12X=50,100,0);
卖:IF(IF(V12X=50,100,0)>REF(IF(V12X=50,100,0),1),40,0),colorgreen,LINETHICK3;
DRAWTEXT(卖,50,'主力清仓 '),colorgreen;
V9X:=TROUGHBARS(3,15,1)<10;
V11X:=IF(V9X=1,50,0);
底部:= IF(V11X=50,50,0);
买:IF( 底部>REF(底部,1),40,0),coloryellow,LINETHICK4;
DRAWTEXT(买,50,'主力抄底 '),coloryellow;
V7X:=TROUGHBARS(3,15,1)<10; V9S:=IF(V7X=1,50,0);
AAX:=(O+H+L+C)/4;
BBX:=MA(AAX,3);
CCX:=SUM(IF(AAX>REF(AAX,1),AAX*VOL,0),4)/SUM(IF(AAX<REF(AAX,1),AA*VOL,0),4);
DDX:=REF(100-(100/(1+CC)),1);
A1:=HHV(AAX,10);
A2:=LLV(AAX,30);
A3:=A1-A2;
A4:=EMA((AAX-A2)/A3,1)*100;
B1:=HHV(AAX,16);
B2:=LLV(AAX,90);
B3:=B1-B2;
B4:=EMA((AAX-B2)/B3,1)*100;
C1:=HHV(AAX,30);
C2:=LLV(AAX,240);
C3:=C1-C2;
C4:=EMA((AAX-C2)/C3,1)*100;
中线趋势:B4,colorwhite,LINETHICK2;
STICKLINE(A4<5 AND B4<30,0,15,6,0),colorwhite;
D:=CROSS(ZIG(3,50/5)*1,MA(ZIG(3,50/5)*1,2))*1,colorred;
W:=CROSS(MA(ZIG(3,50/5)*1,2),ZIG(3,50/5)*1)*1,colorblue;
VAR1:=(2*CLOSE+HIGH+LOW+OPEN)/5;
VAR2X:=LLV(LOW,34);
VAR3X:=HHV(HIGH,34);
爆发线: 50,colorlired;
VAR12S:=(HIGH+LOW+CLOSE)/3;
VAR13S:=(VAR12S-MA(VAR12S,14))/(0.015*AVEDEV(VAR12S,14));
VAR14S:=(VAR12S-MA(VAR12S,70))/(0.015*AVEDEV(VAR12S,70));
VAR15S:=IF(VAR13S>=150 AND VAR13S<200 AND VAR14S>=150 AND VAR14S<200,10,0);
VAR16S:=IF(VAR13S<=-150 AND VAR13S>-200 AND VAR14S<=-150 AND VAR14S>-200,-10,VAR15S);
VAR17S:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;
VAR18S:=100-ABS(VAR17S);
VAR19S:=IF(VAR18S<90,VAR18S,100);
VAR1AS:=IF(VARE>0,VARE,0);
VAR1BS:=IF(VAR14S>=200 AND VAR13S>=150,15,IF(VAR14S<=-200 AND VAR13S<=-150,-15,VAR16S))+60;
VAR1CS:=VAR1AS>48 AND VAR1BS>60 AND VAR19S<100;
DRAWTEXT(VAR1CS AND COUNT(VAR1CS,30)=1,60,'大资金出货'),LINETHICK1,COLORFFCC66;
STICKLINE(VAR1CS AND COUNT(VAR1CS,30)=1,0,50,5,0),COLORFFCC66,LINETHICK3;



小杨斜率抓牛股:

量能饱和度公式,合格量能即大涨( 顶尖财经 股票学院: http://www.58188.com )
 
选股可用:合格量能:量能饱和度>50,NODRAW;
如果用在通达信,需要改改,最后一行,改成上面这样还可以选股,当然直接选大于50也行。
 
N:=20;
量能饱和度:IF((AMOUNT/C)/(HHV(AMOUNT,N)/HHV(C,N))*100>100,100,(AMOUNT/C)/(HHV(AMOUNT,N)/HHV(C,N))*100);
STICKLINE(((CLOSE > 0) AND ISLASTBAR),20,121,6,10),COLORFFFFFF;
STICKLINE(((量能饱和度 <= 5) AND ISLASTBAR),21,(20 + 量能饱和度),5,0),COLORFFFFFF;
STICKLINE((((量能饱和度 > 5) AND (量能饱和度 <= 20)) AND ISLASTBAR),21,(20 + 量能饱和度),5,0),COLORCCFF88;
STICKLINE((((量能饱和度 > 20) AND (量能饱和度 <= 40)) AND ISLASTBAR),21,(20 + 量能饱和度),5,0),COLORFF00FF;
STICKLINE(((量能饱和度 > 40) AND ISLASTBAR),21,(20 + 量能饱和度),5,0),COLOR0000FF;
合格量能:50;
 



自创高抛低吸:

Var1:=REF(OPEN,1);
Var2:=SMA(MAX(OPEN-Var1,0),6,1)/SMA(ABS(OPEN-Var1),6,1)*100;
Var3:=REF(CLOSE,1);
Var4:=SMA(MAX(CLOSE-Var3,0),6,1)/SMA(ABS(CLOSE-Var3),6,1)*100;
Var5:=REF(HIGH,1);
Var6:=SMA(MAX(HIGH-Var5,0),6,1)/SMA(ABS(HIGH-Var5),6,1)*100;
Var7:=REF(LOW,1);
Var8:=SMA(MAX(LOW-Var7,0),6,1)/SMA(ABS(LOW-Var7),6,1)*100;
STICKLINE(Var4<Var2,Var2,Var4,8,0),colorgreen;
STICKLINE(Var4>Var2,Var2,Var4,8,0),colorred;
STICKLINE(Var4>Var2 AND Var6>Var8 AND Var8>Var4,Var4,Var6,0.5,1),colorred;
V1:=STICKLINE(Var4>Var2 AND Var6>Var8 AND Var8<Var4,Var4,Var6,0.5,1),colorred;
V2:=STICKLINE(Var4>Var2 AND Var6<Var8 AND Var6>Var4,Var4,Var8,0.5,1),colorred;
V3:=STICKLINE(Var4>Var2 AND Var6>Var8 AND Var6<Var2,Var2,Var8,0.5,1),colorred;
V4:=STICKLINE(Var4>Var2 AND Var6>Var8 AND Var6>Var2,Var2,Var8,0.5,1),colorred;
v5:=STICKLINE(Var4>Var2 AND Var6<Var8 AND Var8<Var2,Var2,Var6,0.5,1),colorred;
STICKLINE(Var4>Var2 AND Var6<Var8 AND Var8>Var2,Var2,Var6,0.5,1),colorred;
STICKLINE(Var4<Var2 AND Var6>Var8 AND Var6<Var4,Var4,Var8,0.5,1),colorgreen;
v6:=STICKLINE(Var4<Var2 AND Var6<Var8 AND Var8<Var4,Var4,Var6,0.5,1),colorgreen;
V7:=STICKLINE(Var4<Var2 AND Var6<Var8 AND Var6>Var4,Var4,Var8,0.5,1),colorgreen;
V8:=STICKLINE(Var4<Var2 AND Var6>Var8 AND Var6<Var4,Var2,Var8,0.5,1),colorgreen;
V9:=STICKLINE(Var4<Var2 AND Var6>Var8 AND Var6>Var4,Var2,Var8,0.5,1),colorgreen;
V10:=STICKLINE(Var4<Var2 AND Var6<Var8 AND Var8<Var2,Var2,Var6,0.5,1), colorgreen;
STICKLINE(Var4<Var2 AND Var6<Var8 AND Var8>Var2,Var2,Var6,0.5,1),colorgreen;
顶部线:80,coloryellow;
底部线:20;
中部线:50;
生命指数: 3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
顶:IF(生命指数>90,80,90);
底:IF(生命指数<10,30,10),coloryellow;
买入时间: IF(CROSS(生命指数,底),20,0);
N1:=3;N2:=7;N3:=21;
LC:=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100;
ZB1:=RSI1<底;
建仓:IF(CROSS(RSI1,底) ,10,0),LINETHICK1;
DRAWICON(CROSS(RSI1,底) ,20,1);
DRAWICON(建仓 AND 买入时间,10,1);
ZB2:=(ZB1=0 AND RSI1<=顶);
卖出:IF(ZB2=1 AND REF(ZB2,1)=0 AND 建仓=0,90,100),LINETHICK1;
 

上一篇:同花顺源码:沐阳高科,天网恢恢,买入指示

下一篇:同花顺源码:大资金进出,主图成本线,TD组合