當前位置: 網站首頁 > 股票軟件公式 > 同花順公式 > 文章 當前位置: 同花順公式 > 文章

信號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.mondayfootballnight.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;

上一篇:七劍(同花順公式源碼)

下一篇:慧靈資本金牛(同花順公式源碼)

亚洲免费在线视频播放