同花顺辅助趋势线公式
1.指标>80 时,回档机率大;指标<20 时,反弹机率大;
2.K在20左右向上交叉D时,视为买进信号参考;
3.K在80左右向下交叉D时,视为卖出信号参考;
4.SKDJ波动于50左右的任何讯号,其作用不大。
源码
RSV:= (C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
FASTK:=SMA(RSV,3,1);
Y1A:=((SMA(FASTK,3,1))/2+40)*1.1;
线上牛:SMA(Y1A,3,1),colorwhite;
RSV1:= (HHV(H,9)-C)/(HHV(H,9)-LLV(L,9))*100;
Y2A:=(SMA(RSV1,3,1)/2)*1.1;
线下熊:SMA(Y2A,3,1),colorgreen;
V9:=TROUGHBARS(3,15,1)<10; V11:=IF(V9=1,50,0);
底部:= IF(V11=50,50,0);
V10:=PEAKBARS(3,15,1)<10; V12:=IF(V10=1,50,0);
头部:= IF(V12=50,100,0);
V6:=CLOSE/REF(CLOSE,2)>=1.1;
V7:=BACKSET(V6,2);
买:IF((V7 AND COUNT(V7,3)=1),50,0),colormagenta,LINETHICK2;
头部:= IF(V12=50,100,0);
卖:IF(头部>REF(头部,1),50,0),colorgreen,LINETHICK2;DRAWTEXT(卖,50,'★高顶出货 '),colorgreen;
底部:= IF(V11=50,50,0);
买:IF( 底部>REF(底部,1),25,0),coloryellow,LINETHICK3; DRAWTEXT(买,30,'★主力抄底 '),coloryellow;
N:=5;
C0:=(H+L+C)/3;
a1:=HHV(C0,n);
a2:=LLV(C0,n);
a3:=a1-a2;
a4:=EMA((C0-a2)/a3,2)*100;
b1:=HHV(C0,4*n);
b2:=LLV(C0,4*n);
b3:=b1-b2;
b4:=EMA((C0-b2)/b3,2)*100;
C1:=HHV(C0,16*n);C2:=LLV(C0,16*n);C3:=C1-C2;
C4:=EMA((C0-C2)/C3,2)*100;
j:a4,colorred,linethick2;
VARC:=(ZIG(3,6)>=REF(ZIG(3,6),1)) AND (REF(ZIG(3,6),1)<=REF(ZIG(3,6),2)) AND (REF(ZIG
(3,6),2)<=REF(ZIG(3,6),3))AND (REF(ZIG(3,6),3)<=REF(ZIG(3,6),4));
VARD:=(ZIG(3,6)<=REF(ZIG(3,6),1)) AND (REF(ZIG(3,6),1)>=REF(ZIG(3,6),2)) AND (REF(ZIG
(3,6),2)>=REF(ZIG(3,6),3))AND (REF(ZIG(3,6),3)>=REF(ZIG(3,6),4));
DRAWTEXT((VARC=1),(9),'★短买'),Color0000FF;
DRAWTEXT((VARD=1),88,'★短卖'),Color00FF00;
VARF:=TROUGHBARS(3,15,1)<4;
VAR11:=IF(VARF=1,50,0);
DRAWTEXT(FILTER(VARF=1,3),1,'▲买进'),colorred;
VAR3:=PEAKBARS(3,15,1)<10;
VAR5:=IF(VAR3=1,2,0);
顶:= IF(VAR5=2,2,0);
顶A:=IF(顶>REF(顶,1),100,0),colorgreen;
DRAWTEXT(顶A=100,90,'▼卖出'),COLOR00FF00;
VAR10:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);
VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
VAR12:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);
VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);
VAR14:=ZIG(3,22)<REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);
VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);
VAR16:=ZIG(3,51)<REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)>=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);
VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
VAR18:=ZIG(3,72)<REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)>=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);
VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);
VAR1A:=EMA(VAR19,100);
VAR1B:=2*(VAR19-VAR1A);
VAR1C:=POW(VAR1B,3)*0.1+POW(VAR1B,1);
选股买点: VAR10, coloryellow;
DRAWTEXT(VAR13,35.6,'★确定买进'), colorred;
DRAWICON(选股买点>0,4.2,1);
DRAWTEXT(VAR17,22.3,'★发现黑马★'), COLORFF6600;
LOWV:=LLV(LOW,9);
HIGHV:=HHV(HIGH,9);
RSV:=EMA((CLOSE-LOWV)/(HIGHV-LOWV)*100,3);
K:EMA(RSV,3);
D:MA(K,3);
STICKLINE(K>D , K,D ,2.5,0),colorred,LINETHICK2;
STICKLINE(D>K,K,D,2.5,0),colorgreen,LINETHICK2;
逃顶线:90,colorgreen;
中轴线: 50,colorred;
抄底线:10,coloryellow;
DRAWICON(CROSS(K,D) AND K<=50,12,11),colorred;
DRAWICON(CROSS(D,K) AND K>=80,88,4),colorgreen;
A1:=BARSLAST(REF(CROSS(K,D),1));
底背离:REF(CLOSE,A1+1)>CLOSE AND K>REF(K,A1+1) AND CROSS(K,D);
DRAWLINE(A1=0,D,底背离,D,0),colorred,LINETHICK1;
A2:=BARSLAST(REF(CROSS(D,K),1));
顶背离:REF(CLOSE,A2+1)<CLOSE AND REF(D,A2+1)>D AND CROSS(D,K);
DRAWLINE(A2=0,D,顶背离,D,0),colorgreen,LINETHICK1;
DRAWTEXT(底背离>0,D-5,'★加仓'),colorred;
DRAWTEXT(顶背离>0,D-5,'★减仓'),colorgreen;