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

同花顺源码:量子波段王,简单均线,双龙乘风出海趋势均线

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

1、量子波段王

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,4,0),colorgreen , ;
STICKLINE(Var4>Var2,Var2,Var4,4,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;
中部线:50;
底部线:20;
生命指数: 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(生命指数,底),15,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;




2、简单均线

适合上涨趋势,配合60日均线一起用效果较好。这是我做的第一个指标,做的不是很好,请见谅。
 

EMA1:EMA(CLOSE/2+OPEN/2,A1);
EMA2:EMA(CLOSE/2+OPEN/2,A2);
DRAWICON(CROSS(EMA1,EMA2),LOW,1);
DRAWICON(CROSS(EMA2,EMA1),HIGH,2);
STICKLINE(EMA1>EMA2,EMA1,EMA2,0,0),Color0000ff;
STICKLINE(EMA1>EMA2,EMA1,EMA2,3,0),Color000099;
STICKLINE(EMA1>EMA2,EMA1,EMA2,2,0),Color0000bb;
STICKLINE(EMA1>EMA2,EMA1,EMA2,1,0),Color0000dd;
STICKLINE(EMA1>EMA2,EMA1,EMA2,0.3,0),Color0000ff;
STICKLINE(EMA1<EMA2,EMA1,EMA2,0,0),Color00ff00;
STICKLINE(EMA1<EMA2,EMA1,EMA2,3,0),Color009900;
STICKLINE(EMA1<EMA2,EMA1,EMA2,2,0),Color00bb00;
STICKLINE(EMA1<EMA2,EMA1,EMA2,1,0),Color00dd00;
STICKLINE(EMA1<EMA2,EMA1,EMA2,0.3,0),Color00ff00;



3、双龙乘风出海趋势均线

//双龙乘风出海趋势均线主图

N1:=20;
N2:=34;
C1:=EMA(C,5);
C2:=EMA(C,8);
C3:=EMA(C,10);
C4:=EMA(C,15);
C5:=EMA(C,20);
RSV:=C1<REF(C1,1) OR C2<REF(C2,1) OR C3<REF(C3,1) OR C4<REF(C4,1) OR C5<REF(C5,1);
NOTEXTA:C1,LINETHICK2,colormagenta;
NOTEXTB:IF(RSV,C1,DRAWNULL),LINETHICK2,colorblue;
MA3:MA(CLOSE, N1);
MA34:MA(CLOSE, N2);
MA(C,3);
N:=10;
T1:=CONST(HHVBARS(V,N));
T0:IF(CURRBARSCOUNT<=N+3,CONST(IF(T1=0,C,REF(C,T1))),DRAWNULL),COLORFF00FF;
IF(CURRBARSCOUNT=T1+1,T0,DRAWNULL),CIRCLEDOT,COLORFF00FF;HHJSJDA:=(3*CLOSE+OPEN+LOW+HIGH)/6; HHJSJDB:(20*HHJsjda+19*REF(HHJsjda,1)+18*REF(HHJsjda,2)+17*REF(HHJsjda,3 )+16*REF(HHJsjda,4)+15*REF(HHJsjda,5)+14*REF(HHJsjda,6) +13*REF(HHJsjda,7)+12*REF(HHJsjda,8)+11*REF(HHJsjda,9)+10*REF(HHJsjda,10 )+9*REF(HHJsjda,11)+8*REF(HHJsjda,12) +7*REF(HHJsjda,13)+6*REF(HHJsjda,14)+5*REF(HHJsjda,15)+4*REF(HHJsjda,16) +3*REF(HHJsjda,17)+2*REF(HHJsjda,18)+ REF(HHJsjda,20))/210,coloryellow; HHJSJDC:MA(HHJSJDB,5),colorred;
MA1:MA(C,5),colorred,LINETHICK1;
MA2:MA(C,10),coloryellow,LINETHICK1;
MA3:MA(C,30),COLOR9933CC,LINETHICK1;
MA4:MA(C,60),colorgreen,LINETHICK1;
K1:=BACKSET(MA1<REF(MA1,1),2);
IF(K1,MA1,DRAWNULL),COLOR00CC33,LINETHICK1;
K2:=BACKSET(MA2<REF(MA2,1),2);
IF(K2,MA2,DRAWNULL),COLORFFCC66,LINETHICK1;
K3:=BACKSET(MA3<REF(MA3,1),2);
IF(K3,MA3,DRAWNULL),colorblue,LINETHICK1;
阻力价:HHV(HIGH,19),LINETHICK1,NODRAW;
Y:=(MA(C,5)-MA(C,30))/MA(C,5)*100;
YY1:=C>MA(C,5) AND OPEN<MA(C,5);
YY3:=C>MA(C,10) AND OPEN<MA(C,10);
YY5:=C>MA(C,30) AND OPEN<MA(C,30);
DRAWTEXT(YY1 AND YY5 AND YY3,LOW*0.97,'双龙乘风出海'),colorred;
VAR1:=HHV(HIGH,25);
VAR2:=LLV(LOW,25);
VAR3:=EMA((CLOSE-VAR2)/(VAR1-VAR2)*100,20);
VAR4:=EMA((CLOSE-VAR2)/(VAR1-VAR2)*100,5);
VAR5:=CROSS(VAR4,VAR3);
DRAWICON(CROSS(VAR4,VAR3) ,LOW*0.97,11);
X3:DRAWICON(CROSS(MA1,MA2),MA2,1);
X4:DRAWICON(CROSS(MA1,MA3),MA3,1);
X5:DRAWICON(CROSS(MA2,MA3),MA3,1);
偏偏趋势H1:EMA(CLOSE,5);
H2:EMA(偏偏趋势H1,20);
H3:EMA(CLOSE,60),colorgreen;
H4:EMA(CLOSE,120),colorblack;
STICKLINE(偏偏趋势H1>H2,偏偏趋势H1,H2,1,1),colorred;
STICKLINE(偏偏趋势H1<H2,偏偏趋势H1,H2,1,1),colorblue;

上一篇:同花顺源码:超级黑马图,仓位资金抄底MY,主力雷达先锋版

下一篇:同花顺源码:发财指标,6月 换手率趋势,九转公式