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

同花顺源码精选:顶底波段王,双保险顶底,突破

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

1、顶底波段王

VAR1:=1;

VAR2:=((((2*CLOSE)+HIGH)+LOW) / 4);
低位金叉跟进:20;
高位死叉小心:90,COLORFFFF00;
VAR4:=LLV(LOW,5);
VAR5:=HHV(HIGH,4);
C1:(EMA((((VAR2-VAR4)/(VAR5-VAR4))*100),4)*VAR1),COLORFF00FF;
C2:(EMA(((0.667*REF(C1,1))+(0.333*C1)),2)*VAR1),COLORFFFFFF;
条件:=CROSS(C1,C2) AND C1<40;
条件0:=CROSS(C2,C1) AND C1>90;
TJ1:=CROSS(C1,C2);
TJ2:=CROSS(C2,C1);
TJ3:=CROSS(C1,C2) AND REF(C1,1)<20;
TJ4:=CROSS(C2,C1) AND REF(C1,1)>80;
DRAWTEXT(FILTER((REF(条件,1) AND (REF(LOW,1)>LOW OR TJ2)) OR (REF(条件,2) AND
(REF(LOW,2)>LLV(LOW,3) OR TJ2))
OR (REF(条件,3) AND (REF(LOW,3)>LLV(LOW,4) OR TJ2)),4),50,'止'),colorgreen;
DRAWTEXT(FILTER((REF(条件,1) AND (REF(LOW,1)>LOW OR TJ2)) OR (REF(条件,2) AND
(REF(LOW,2)>LLV(LOW,3) OR TJ2))
OR (REF(条件,3) AND (REF(LOW,3)>LLV(LOW,4) OR TJ2)),4),45,'B'),colorgreen;
DRAWTEXT(条件,20,'买'),colorwhite;
DRAWTEXT(条件0,85,'卖'),coloryellow;
DRAWTEXT(CROSS(C1,75),70,'危险区'),colorblue;
DRAWTEXT(TJ3,65,'安'),colorred;
DRAWTEXT(TJ3,56,'全'),colorred;
DRAWTEXT(TJ3,47,'买'),colorred;
DRAWTEXT(TJ3,38,'点'),colorred;
DRAWTEXT(TJ4,85,'逃顶'),coloryellow;
H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
阻力:=L1+P1*7/8,colorgreen;
支撑:=L1+P1*0.5/8,colorred;
中线:=(支撑+阻力)/2,colorwhite,POINTDOT;
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);
趋势线:EMA(V11,3),LINETHICK2,colorlimagenta;
V12:=(趋势线-REF(趋势线,1))/REF(趋势线,1)*100;
准备买入:STICKLINE(趋势线<11,趋势线,11,5,0),coloryellow;
AA:=(趋势线<11) AND FILTER((趋势线<=11),15) AND C<中线;
BB0:=REF(趋势线,1)<11 AND CROSS(趋势线,11) AND C<中线;
BB1:=REF(趋势线,1)<11 AND REF(趋势线,1)>6 AND CROSS(趋势线,11);
BB2:=REF(趋势线,1)<6 AND REF(趋势线,1)>3 AND CROSS(趋势线,6);
BB3:=REF(趋势线,1)<3 AND REF(趋势线,1)>1 AND CROSS(趋势线,3);
BB4:=REF(趋势线,1)<1 AND REF(趋势线,1)>0 AND CROSS(趋势线,1);
BB5:=REF(趋势线,1)<0 AND CROSS(趋势线,0);
BB:=BB1=1 OR BB2=1 OR BB3=1 OR BB4=1 OR BB5=1;
下单买入:STICKLINE(BB=1 AND C<中线,11,50,5,0),colorred;
DRAWICON(BB=1 AND C<中线,55,1);
DRAWTEXT(BB0,60,'★买'),colorred;
DRAWTEXT(AA,16,'准备买入'),coloryellow;
准备卖出:STICKLINE(趋势线>89,趋势线,89,5,0),colorwhite;
CC:=(趋势线>89) AND FILTER((趋势线>89),15) AND C>中线;
DD0:=REF(趋势线,1)>89 AND CROSS(89,趋势线) AND C>中线;
DD1:=REF(趋势线,1)>89 AND REF(趋势线,1)<94 AND CROSS(89,趋势线);
DD2:=REF(趋势线,1)>94 AND REF(趋势线,1)<97 AND CROSS(94,趋势线);
DD3:=REF(趋势线,1)>97 AND REF(趋势线,1)>99 AND CROSS(97,趋势线);
DD4:=REF(趋势线,1)>99 AND REF(趋势线,1)<100 AND CROSS(99,趋势线);
DD5:=REF(趋势线,1)>100 AND CROSS(100,趋势线);
DD:=DD1=1 OR DD2=1 OR DD3=1 OR DD4=1 OR DD5=1;
下单卖出:STICKLINE(DD=1 AND C>中线,89,50,5,0),colorgreen;
DRAWICON(DD=1 AND C>中线,45,2);
DRAWTEXT(DD0,40,'★卖'),colorgreen;
DRAWTEXT (CC,84,'准备卖出'),colorwhite;
顶:89,colorgreen;
底:11,colorred;
中:50,POINTDOT,colorwhite;
DRAWTEXT(ISLASTBAR,顶,'顶'),colorgreen;
DRAWTEXT(ISLASTBAR,底,'底'),colorred;
DRAWTEXT(ISLASTBAR,中,'中'),colorwhite;



2、双保险顶底

顶底双保险,顶部一排黄色吸筹,底部一排绿色出仓,底部黄红起始点介入,底部蓝绿终点出仓,也可波段介入,多种合并。( 股民学院: http://www.58188.com )

//双保险顶底 
短线成本:=EMA(CLOSE,17),LINETHICK1,colorwhite;
A:=(3*C+L+O+H)/6;
X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+
14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)
+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+
REF(A,20))/210;
中线成本:=EMA(X,13),LINETHICK1,COLORFF00FF;
STICKLINE(BARSLAST(短线成本<中线成本)>30,95,100,4,0),colorgreen;
STICKLINE(BARSLAST(短线成本>中线成本)>30,95,100,4,0),coloryellow;
VAR1:=1;
VAR2:=LLV(LOW,10);
VAR3:=HHV(HIGH,25);
N1:=5;
N4:=34;
CQ:=100*(C-LLV(L,N4))/(HHV(C,N4)-LLV(L,N4));
SAT:=(AMOUNT/C)/(HHV(AMOUNT,N4)/HHV(C,N4));
饱和度:=IF(SAT>1,1,SAT)*100;
W1:=C=HHV(C,20);
W2:=BARSLAST(W1);
W3:=IF(W2>0,REF(C,W2),REF(C,W2));
W4:=CROSS(C,REF(W3,1));
STICKLINE(饱和度>=97 AND CQ>90,0,100,2,0),colorred;
中期:=100*(C-LLV(L,N4))/(HHV(C,N4)-LLV(L,N4));
持股:=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);
支撑:=LLV(持股,3);
短期线:EMA((CLOSE-VAR2)/(VAR3-VAR2)*4,4)*VAR1*30,LINETHICK1,colorgreen;
中期线:MA(持股,12),colorwhite,LINETHICK1;
STICKLINE(支撑<中期线,支撑,中期线,2,0),COLOR6B8E23;
STICKLINE(持股>0,支撑,持股,2,0),colorred;
STICKLINE(支撑>中期线,中期线,支撑,2,0),COLOR38B0DE;
STICKLINE(支撑=持股 AND 持股>中期线,中期线,支撑,2,0),COLORFF00FF;
STICKLINE(W4 AND COUNT(W4,5)=1,85,100,2,0),colorgreen;
底部线:0,colorwhite;
卖出线:100,colorred;
VARF2:=TROUGHBARS(3,15,1)<4;
VARF1:=PEAKBARS(3,15,1)<4;
STICKLINE(FILTER(VARF2=1,5),35,0,6,0),coloryellow;
STICKLINE(FILTER(VARF1=1,5),35,0,6,0),colorblue;
VAR2C:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;
VAR3C:=SMA(SMA(VAR2C,3,1),3,1)/30;
VAR4C:=EMA(VAR3C,5);
VAR5C:=3*VAR3C-2*VAR4C;
AC:=CROSS(VAR5C,VAR3C) AND VAR3C<2.1 AND C>O;
STICKLINE(AC,0,15,6,0),colorcyan;
VAR3:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
VAR4:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
VAR5:=(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100;
VAR6:=(VAR3+VAR4+VAR5)/3;
VAR7:=EMA(VAR6,5);
VAR8:=IF(VAR6<=-20,10,0);
VAR9:=HHV(VAR8,10);
STICKLINE(VAR8=10,50,10,5,0),COLOR6666FF;
VARA:=IF(VAR9 AND CROSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);
STICKLINE((VARA=20),0,10,6,0),colorwhite;
VARC:=(ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)) AND (REF(ZIG
(3,5),2)<=REF(ZIG(3,5),3));
VARD:=(ZIG(3,5)<REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)>=REF(ZIG(3,5),2)) AND (REF(ZIG
(3,5),2)>=REF(ZIG(3,5),3));
STICKLINE((VARC=1),(45),0,6),COLOR0000FF;
STICKLINE((VARD=1),45,0,6),colorgreen;
VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VARF:=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);
VAR10:=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);
VAR11:=VARF<REF(VAR10,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);
DRAWTEXT(VAR11 AND COUNT(VAR11,30)=1,90,' '),LINETHICK2,COLORFF00FF;
STICKLINE(VAR11 AND COUNT(VAR11,30)=1,1,25,5,0),COLORFF00FF;
VAR12:=(HIGH+LOW+CLOSE)/3;
VAR13:=(VAR12-MA(VAR12,14))/(0.015*AVEDEV(VAR12,14));
VAR14:=(VAR12-MA(VAR12,70))/(0.015*AVEDEV(VAR12,70));
VAR15:=IF(VAR13>=150 AND VAR13<200 AND VAR14>=150 AND VAR14<200,10,0);
VAR16:=IF(VAR13<=-150 AND VAR13>-200 AND VAR14<=-150 AND VAR14>-200,-10,VAR15);
VAR17:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;
VAR18:=100-ABS(VAR17);
VAR19:=IF(VAR18<90,VAR18,100);V1:=ZIG(3,12);
VAR001:=ZIG(3,12)<REF(ZIG(3,12),1) AND REF(ZIG(3,12),1)>REF(ZIG(3,12),2);
VAR002:=ZIG(3,12)>REF(ZIG(3,12),1) AND REF(ZIG(3,12),1)<REF(ZIG(3,12),2);
VAR003:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);
买点:= VAR003,colorred;
STICKLINE(买点,0,35,5,0),coloryellow,LINETHICK2;



3、突破

突破,原来就是金叉上涨
赚取突破后惯性上冲的钱

VAR1:=HHV(HIGH,N);
VAR2:=LLV(LOW,N);
阻力线:EMA((CLOSE-VAR2)/(VAR1-VAR2),M_STOP)-0.5,COLORF0F000,LINETHICK2;
操作线:EMA((CLOSE-VAR2)/(VAR1-VAR2),M_GO)-0.5,colorred,LINETHICK2;
DRAWTEXT(CROSS(操作线,阻力线) AND 阻力线<0,阻力线,'突破'),coloryellow;
DRAWTEXT(CROSS(阻力线,操作线) AND 阻力线>0.25,阻力线,'破位'),colorgreen;
红绿棒:(操作线-阻力线),COLORSTICK;
 

上一篇:同花顺源码精选:主力清洗组合公式,波段顶底,暴利王

下一篇:同花顺公式下载:寻庄出击AA