买好股公式网 > 股票公式 > 通达信公式 > 通达信纳金MACD副图公式

通达信纳金MACD副图公式

2019年02月26日 字体: 人气:

通达信纳金MACD副图公式



DIFF:EMA(C,12)-EMA(C,26),COLORWHITE;

DEA:EMA(DIFF,8),COLORFFAA00;

ZERO:0,COLORRED;

MACD:=2*(DIFF-DEA);

DIFF上穿0轴:=CROSS(DIFF,0),NODRAW;

STICKLINE(MACD>=0,MACD,0,2,1),COLOR0000FF;

STICKLINE(MACD<0,MACD,0,2,1),COLORGREEN;

STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,3,0 ),COLOR00AAFF;

STICKLINE(DIFF上穿0轴,MACD,0,3,2),COLORYELLOW;

DRAWTEXT(DIFF上穿0轴,MACD*2.5,'进'),COLORCYAN;

X1:=IF(DIFF<0,DIFF,0),COLOR0000FF,LINETHICK2;

X2:=IF(DIFF<0,0,DIFF),COLORMAGENTA,LINETHICK1;

X3:=IF(DIFF<DEA,DIFF,DEA),COLOR00FF00,LINETHICK1;

X4:=IF(DIFF>DEA,DEA,DEA),LINETHICK1,COLORFFBB11;

MACD金叉:=CROSS(DIFF,DEA),NODRAW;

MACD低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.01,NODRAW;

MACD非低位金叉:=MACD金叉 AND MACD低位金叉<1,NODRAW;

STICKLINE(MACD低位金叉,DEA*0.86,DEA*0.66,6,0),COLORYELLOW;

DRAWTEXT(MACD低位金叉,DEA*1.5,' 低金'),COLORYELLOW;

JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));

MACD二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;

STICKLINE(MACD二次金叉,DEA*1.3,DEA*0.76,6,0),COLORFF00FF;

DRAWTEXT(MACD二次金叉,DEA*0.96,' -二金'),COLORFF00FF;

A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));

MACD底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);

STICKLINE(MACD底背离,DEA*1.09,DEA*0.86,6,0),COLOR00FF00;

DRAWLINE(A1=0,DEA,MACD底背离,DEA,0),COLORRED,LINETHICK1;

DRAWTEXT(MACD底背离,DEA*2,' 底背离'),COLOR6600FF;

A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));

MACD顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);

DRAWLINE(A2=0,DEA,MACD顶背离,DEA,0),COLORGREEN,LINETHICK1;

DRAWTEXT(MACD顶背离,DEA*1.2,' 顶背离'),COLOR00FF00;

AA:=CROSS(DIFF,DEA) AND DEA>0;

T:=BARSLAST(CROSS(DEA,DIFF));

CC:=COUNT(DIFF>=DEA,T)=1;

MACD强金叉:=(AA AND CC),NODRAW;

DRAWTEXT(MACD强金叉,DEA*0.5,'-强金'),COLORYELLOW;

MACD死叉:=CROSS(DEA,DIFF),NODRAW;

MACD强金叉前溯:=COUNT(MACD强金叉,100);

MACD强金叉期:=MACD强金叉前溯+MACD强金叉,NODRAW;

MACD金叉期:=COUNT(MACD金叉,100),NODRAW;

MACD死叉期:=COUNT(MACD死叉,100),NODRAW;

低位金叉:=COUNT(MACD低位金叉,100),NODRAW;

DRAWTEXT(MACD金叉 AND (1-MACD低位金叉) AND (1-MACD二次金叉) AND (1-MACD强金叉),DEA*1.1,' 金叉'),COLORMAGENTA;

DIFFRO:=CROSS(DIFF,0),NODRAW;

DIFF过零轴期:=COUNT(DIFFRO,100),NODRAW;

过零轴:=低位金叉+DIFF过零轴期,NODRAW;

N:=9;M1:=3;M2:=3;

RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;

K:=SMA(RSV,M1,1),COLORYELLOW,LINETHICK1;

D:=SMA(K,M2,1),COLORCYAN,LINETHICK1;

J:=3*K-2*D,COLORMAGENTA,LINETHICK1;

KDJ势增:J>REF(J,1),NODRAW;

高安全区:=0,COLORRED;

安全区:=20,COLORCYAN;

风险区:=100,COLORGREEN;

U1:=BARSLAST(REF(CROSS(K,D),1));

U2:=REF(C,U1+1)>C AND REF(K,U1+1)<K AND CROSS(K,D)AND D<50;

底背离:=IF(U2>0,1,0);

RR:=MAX(C,O);

Q1:=HHV(RR,5);

Q2:=D<REF(D,1) AND REF(D,1)>REF(D,2);

A2=BARSLAST(REF(Q2,1));

K顶背离:=(REF(Q1,A2+1)<Q1 AND K<REF(K,A2+1) AND Q2 ),NODRAW;

KDJ金叉:=CROSS(J,K),NODRAW;

KDJ死叉:=CROSS(K,J),NODRAW;

KDJ买点:=KDJ金叉 ;

KDJ卖点:=KDJ死叉;

KDJ买点期:=COUNT(KDJ买点,100),NODRAW;

DRAWTEXT(KDJ买点,DEA*1.6,'K'),COLORYELLOW;

通:=MA(C,17);

BHG:=BARSLAST(REF(MACD金叉,1)),NODRAW;

W底金叉:=MACD金叉 AND DIFF>REF(DIFF,BHG),NODRAW;

W底金叉期:=COUNT(W底金叉,100),NODRAW;

W底买点:W底金叉期>0 AND C>通 AND KDJ势增,NODRAW;

低位金叉2:COUNT(MACD低位金叉,100),NODRAW;

抄底点:低位金叉>0 AND KDJ势增>0 AND J<风险区 ,NODRAW;

抄底期:COUNT(抄底点,100),NODRAW;

加仓点:=DIFF上穿0轴,NODRAW;

加仓期:=COUNT(加仓点,100),NODRAW;

MACD买点:(抄底期>0 OR 加仓点>0) AND (C>通) ,NODRAW;

MACD买点期:COUNT(MACD买点,100) AND KDJ势增 AND (C>通),NODRAW;

STICKLINE(抄底点 ,IF(MIN(DEA,DIFF)>-0.2,MIN(DEA,DIFF)*1.2,MIN(DEA,DIFF)*1),MIN(DEA,DIFF),4,0),COLORRED;

STICKLINE(W底买点 ,IF(MIN(DEA,DIFF)>-0.2,MIN(DEA,DIFF)*1.5,MIN(DEA,DIFF)*1),MIN(DEA,DIFF),6,0),COLORYELLOW;


0% (0)
0% (10)

关于通达信纳金MACD副图公式的评论:

 以下是对 [通达信纳金MACD副图公式] 的评论,总共:0条评论
加入收藏 | 联系我们 | 免责声明 | 站内地图 | 关于我们