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

同花顺源码:我的建仓指标,买卖波段顶底,相当准

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

我的建仓指标:

生命线:MA(CLOSE,26),colorblue,LINETHICK1,PRECIS2;

多头线:EMA(C,1.1),coloryellow,LINETHICK1,PRECIS2;
空头线:EMA(C,1),COLOR00FF00,PRECIS2;
均衡线:EMA(空头线,1),colorwhite,PRECIS2;
VAR1:=(100 - ((90 * (HHV(HIGH,21) - CLOSE)) / (HHV(HIGH,21) - LLV(LOW,21))));
VAR2:=(100 - MA(((100 * (HHV(HIGH,12) - CLOSE)) / (HHV(HIGH,12) - LLV(LOW,12))),12));
DRAWTEXT(CROSS(VAR1,MA(VAR2,12)),(LOW * 0.94),'↑买 '),color4440FF,ALIGN1;
DRAWTEXT(CROSS(MA(VAR2,12),VAR1),(HIGH * 1.05),'卖 '),colorFFFF34,ALIGN1;
Var3:=EMA(C,5);
Var4:=EMA(C,10);
Var5:=EMA(C,20);
Var6:=EMA(C,30);
Var7:=(Var3+Var4+Var5+Var6)/4;
Var8:=(Var7-REF(Var7,15))/REF(Var7,15)*100;
Var9:=EMA(Var8,8);
STICKLINE(C>=生命线 AND C>=O,C,O,10,0),COLOR0000ff,LAYER1;
STICKLINE(C>=生命线 AND C>=O,C,O,8,0),COLOR0000ff,LAYER1;
STICKLINE(C>=生命线 AND C>=O,C,O,4,0),COLOR0000ff,LAYER1;
STICKLINE(C>=生命线 AND C>=O,H,L,0.5,0),COLOR0000ff,LAYER1;//红强势
STICKLINE(Var8<1*REF(Var8,1),O,C,10,0),COLORffff00;
STICKLINE(Var8<1*REF(Var8,1),O,C,8,0),COLORffff00;
STICKLINE(Var8<1*REF(Var8,1),O,C,4,0),COLORffff00;
STICKLINE(Var8<1*REF(Var8,1),H,L,0.5,0),COLORffff00;//蓝下跌
STICKLINE(Var8>1*REF(Var8,1),O,C,10,0),COLORc8009f;
STICKLINE(Var8>1*REF(Var8,1),O,C,8,0),COLORc8009f;
STICKLINE(Var8>1*REF(Var8,1),O,C,4,0),COLORc8009f;
STICKLINE(Var8>1*REF(Var8,1),H,L,0.5,0),COLORc8009f;//紫调整
STICKLINE(Var8<1*REF(Var8,1) AND Var9>1*REF(Var9,1),O,C,10,0),COLOR00ff00;
STICKLINE(Var8<1*REF(Var8,1) AND Var9>1*REF(Var9,1),O,C,8,0),COLOR00ff00;
STICKLINE(Var8<1*REF(Var8,1) AND Var9>1*REF(Var9,1),O,C,4,0),COLOR00ff00;
STICKLINE(Var8<1*REF(Var8,1) AND Var9>1*REF(Var9,1),H,L,0.5,0),COLOR00ff00;//绿见顶
买进价:=((C-REF(MA(C,6),1))/6+MA(C,6))*1.004;
买进条件:=CROSS(C,买进价) AND 买进价>REF(买进价,1);
STICKLINE(买进条件,O,C,10,0),colorffffff,LAYER1;
STICKLINE(买进条件,O,C,8,0),colorffffff,LAYER1;
STICKLINE(买进条件,O,C,4,0),colorffffff,LAYER1;
STICKLINE(买进条件,H,L,0.5,0),colorffffff,LAYER1;//白买进
加码价:=((C-REF(MA(C,18),1))/18+MA(C,18))*1.004;
加码条件:=CROSS(C,加码价) AND 加码价>REF(加码价,1);
STICKLINE(加码条件,O,C,10,0),color00ffff,LAYER1;
STICKLINE(加码条件,O,C,8,0),color00ffff,LAYER1;
STICKLINE(加码条件,O,C,4,0),color00ffff,LAYER1;
STICKLINE(加码条件,H,L,0.5,0),color00ffff,LAYER1;//黄加仓
ZDF:=(C-REF(C,1))/REF(C,1)*100;
STICKLINE(ZDF>9.8,O,C,10,1),COLOR0000ff,LAYER1;
STICKLINE(ZDF>9.8,O,C,8,1),COLOR0000ff,LAYER1;
STICKLINE(ZDF>9.8,O,C,4,1),COLOR0000ff,LAYER1;
STICKLINE(ZDF<-9.8,O,C,10,1),COLOR00ff00,LAYER1;
STICKLINE(ZDF<-9.8,O,C,8,1),COLOR00ff00,LAYER1;
STICKLINE(ZDF<-9.8,O,C,4,1),COLOR00ff00,LAYER1;




买卖波段顶底,相当准:

超级准确的顶部和底部,自己写来用的,仅供参考。( 顶尖财经 股票学院: http://www.58188.com )

指标一直在变,买卖出需要配合macd分钟级别顶、底背离。

RSV=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
a=SMA(RSV,M1,1);
b=SMA(a,M2,1);
e=3*a-2*b;
IF(a<0) a=0;
IF(a>100) a=100;
IF(b<0) b=0;
IF(b>100) b=100;
IF(e<0) e=0;
IF(e>100) e=100;
K:a;
D:b;
J:e,colorred,LINETHICK2;
P:=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;
DRAWTEXT(W=1,J*1,'▼下跌确立' ),colorblue;
DRAWTEXT(P=1,J*1.5,'▲上涨确立'),colorred;
V6:=CLOSE/REF(CLOSE,3)>=1.1;
V7:=BACKSET(V6,3);
买:IF((V7 AND COUNT(V7,3)=1),50,0),colormagenta,LINETHICK1;
DRAWTEXT(买,50,'买 '),colormagenta;
V10:=PEAKBARS(3,15,1)<10; V12:=IF(V10=1,50,0);
头部:= IF(V12=50,100,0);
卖:IF(头部>REF(头部,1),40,0),colorgreen,LINETHICK3;DRAWTEXT(卖,40,'主力清仓 '),colorgreen;
V9:=TROUGHBARS(3,15,1)<10; V11:=IF(V9=1,50,0);
底部:= IF(V11=50,50,0);
买:IF( 底部>REF(底部,1),-20,0),colorred,LINETHICK3; DRAWTEXT(买,-30,'主力抄底 '),colorred;
V7:=TROUGHBARS(3,15,1)<10; V9:=IF(V7=1,50,0);
强弱分界线:50,colorred;
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;
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,70,'大资金活动'),LINETHICK1,colorlimagenta;
STICKLINE(VAR11 AND COUNT(VAR11,30)=1,1,60,5,0),colorlimagenta,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;
准备现金: STICKLINE(EMA(V11,3)<=13,0,15,5,0),colorlired;
AA:=(EMA(V11,3)<=13) AND FILTER((EMA(V11,3)<=13),15);
DRAWTEXT (AA,-10,'准备现金'),colorlired;
买入股票: 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),colorwhite,LINETHICK3;
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),colorliblue,LINETHICK1;
DRAWTEXT (CC,20,'主力减仓'),colorliblue;
AA:=(O+H+L+C)/4;
BB:=MA(AA,3);
CC:=SUM(IF(AA>REF(AA,1),AA*VOL,0),4)/SUM(IF(AA<REF(AA,1),AA*VOL,0),4);
DD:=REF(100-(100/(1+CC)),1);
a1:=HHV(AA,10);
a2:=LLV(AA,30);
a3:=a1-a2;
a4:=EMA((AA-a2)/a3,1)*100;
b1:=HHV(AA,16);
b2:=LLV(AA,90);
b3:=b1-b2;
b4:=EMA((AA-b2)/b3,1)*100;
C1:=HHV(AA,30);
C2:=LLV(AA,240);
C3:=C1-C2;
C4:=EMA((AA-C2)/C3,1)*100;
中线趋势:b4,colormagenta,LINETHICK1;
STICKLINE(a4>90 AND b4>70,86,94,6,0),coloryellow;
STICKLINE(a4<5 AND b4<30,0,8,6,0),colorwhite;
 

上一篇:同花顺源码:爆金,MACD牛逼顶底背离,机构活跃程度

下一篇:同花顺源码:主力抄底出货,日周月KDJ金叉