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

信号D买卖点W(同花顺公式源码)

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

根据趋势发出买卖点提示信号,仅供参考,请综合其他指标使用。

//CCI
CCI_N=14;
TYP := (IF(ISNULL(HIGH),CLOSE,HIGH) + IF(ISNULL(LOW),CLOSE,LOW) + CLOSE)/3;
CCI:=(TYP-MA(TYP,CCI_N))/(0.015*AVEDEV(TYP,CCI_N));
a:=100;
b:=-100;
CV:CROSS(CCI,-100);
CX:CROSS(100,CCI);
//CCI黄金坑
RR8:=MA(CLOSE,27);RR9:=(CLOSE-RR8)/RR8*100;RRA:=MA(RR9,2);RRB:=BARSLAST(CROSS(-10,RRA)=1);
CReady:=RRA<-10 AND RRB>3;
STICKLINE(CReady,0,10,8,0),colorblue;
//【黄金坑】:IF(RRD,-120,0),coloryellow,LINETHICK2;
//KDJ
N=9;M1=3;M2=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:SMA(RSV,M1,1),NODRAW;D:SMA(K,M2,1),NODRAW;
J:3*K-2*D;//★★★曲线绘制
DRAWBAND(K,colorlired,D,colorliblue);//★★★曲线绘制
KL=K<=35 OR K>=65;//K值有效范围
KV:CROSS(J,K) AND CROSS(K,D) AND KL,NODRAW;//JKD金叉
KX:CROSS(K,J) AND CROSS(D,K) AND KL,NODRAW;//JDK死叉
KXR:ABS(K-REF(K,1))/REF(K,1)*100,NODRAW;//K值变化率
KXF:=IF(KXR<10,0,KX);//过滤掉K值变化在10%内死叉
//MACD
SHORT=12;LONG=26;M=9;
DIFF:= EMA(CLOSE,SHORT) - EMA(CLOSE,LONG),NODRAW;
DEA := EMA(DIFF,M),NODRAW;
MACD:= 2*(DIFF-DEA),NODRAW;
Zero:= 0;
MV:CROSS(DIFF,DEA),NODRAW;//MACD金叉
MX:CROSS(DEA,DIFF),NODRAW;
MB :(MACD-REF(MACD,1)>-0.03),NODRAW;// AND (DIFF>REF(DIFF,1) OR DEA>REF(DEA,1))
//PSY
PSY_N:=12;PSY_M:=6;
PSY:=COUNT(CLOSE>REF(CLOSE,1),N)/N*100,NODRAW;
PSYMA:MA(PSY,M),LINETHICK2,colorred;
PV:CROSS(PSY,PSYMA),NODRAW;//PSY金叉
PX:CROSS(PSYMA,PSY),NODRAW;
PBA :=PSYMA>REF(PSYMA,1),NODRAW;
//【买卖信号】买入标识 1↑|5:)|7B|9$|11下指###卖出标识 2↓,8S,15跑,12下指
XV:(J>REF(J,1) AND PSYMA<REF(PSYMA,1)) AND KV AND KL;//背离
VX:(J<REF(J,1) AND PSYMA>REF(PSYMA,1)) AND KX AND KL;
//XV:(J>REF(J,1) AND D<REF(D,1)) OR (J<REF(J,1) AND D>REF(D,1));//背离
STICKLINE(XV,100,90,8,0),colorred;
STICKLINE(VX,100,90,8,1),colorblue;
DRAWICON(CV AND KV,15,1);//确定性最好
DRAWICON(PV AND KV,30,5);
DRAWICON(MV AND KV,45,7);
DRAWICON(PV AND KV AND MV,60,9);
//DRAWICON(BARSLAST(PV AND KV,3) AND MV,J,11);//这个不准啊
DRAWICON(CX AND KXF,90,2);//确定性最好
DRAWICON(PX AND KXF,J+10,6);
DRAWICON(MX AND KXF,J+10,8);
DRAWICON(PX AND KXF AND MX,J+10,10);
DRAWICON((CROSS(90,J) AND KX),J+10,12);
//================[sell]=====================
//卖出信号
//情绪=4*SMA((CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,5,1)-3*SMA(SMA((CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,5,1),3.2,1);
情绪=J;
换手:VOL/CAPITAL*100,nodraw;
//最高价:REF(H,1)<HHV(H,N) AND H=HHV(H,N);//N日内最高价
最高价:=HHV(H,10);
//收涨25%
t1:=CLOSE;
t2:=LLV(CLOSE,10);
V10:(t1-t2)/t2,nodraw;//十日涨幅
t3:=LLV(CLOSE,15);
V15:=(t1-t3)/t3;//十五涨幅
//过热股警告
HA:=V10>0.25 AND (REF(CLOSE,1)<CLOSE);//周期内涨幅超过25%
//热度线:120,IF(HA,colorred,colorblack),LINETHICK2;
STICKLINE(HA,120,116,8,0),coloryellow;
//STICKLINE(COUNT(HA,3),120,116,10,0),colorblue;//连续3日过热警告减仓
//DRAWTEXT(,120,'▼'),colorgreen;
//ZTTS:BARSLAST(CLOSE/REF(CLOSE,1)>=1,1);//上一个涨停板至今的天数
QS:=COUNT(CLOSE>OPEN,3)=3;//三连阳,说明强势可能确定,进行提示
STICKLINE(QS,情绪,情绪-5,8,0),colorlimagenta;
//“热门股”卖出条件,卖在情绪上升期
HS1:=情绪>100 AND 换手>REF(换手,1)*1.1 AND 换手>8 AND KXF<10;
HS2:=CROSS(情绪,95) AND HIGH>=(最高价*0.95) AND 换手>8 AND (REF(CLOSE,1)<HIGH) AND KXF<10;//上穿95+大于8高换手率+(例如2020/4/24四方股份逃顶有效)
HS:=HS1 OR HS2;
//STICKLINE(HS,110,85,6,1),colorblue;
DRAWTEXT(HS,65,'卖'),colorblue;
//“普通股”卖出条件,卖在情绪热度下降期
S1:=CROSS(100,情绪) AND HIGH>=(最高价*0.9) AND KXF<10;//下穿高位线 + 最高价为M周期最高价的90%
S2:CROSS(90,J);
S:=S1 OR S2;//股民学院 www.58188.com
//STICKLINE(S,100,90,6,0),colorliblue;
DRAWTEXT(S,90,'减'),colorliblue;
//DRAWTEXT(CROSS(情绪,建仓区),情绪,'-'),colorcyan;
高: IF(HS1,75,IF(HS2,80,IF(S1,85,IF(S2,90,100)))) ,LINETHICK1,colorblue;

上一篇:七剑(同花顺公式源码)

下一篇:慧灵资本金牛(同花顺公式源码)