实战MACD(实战指标二)
DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);
DEA : EMA(DIFF,M);
MACD : 2*(DIFF-DEA), COLORSTICK;
MACD2 : 2*(DEA-DIFF),COLORgreen;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
周K:=MA( KDJ.K#WEEK (9,3,3) ,5);
周D:=MA( KDJ.D#WEEK (9,3,3) ,5);
周J:=MA( KDJ.J#WEEK (9,3,3) ,5);
DRAWICON(k 20 and cross(k,d),MACD,1),align2;
周金:DRAWTEXT(CROSS( KDJ.K#WEEK (9,3,3), KDJ.D#WEEK (9,3,3)) ,MACD,'▲'),align2,COLORred;
周死:DRAWTEXT(CROSS( KDJ.d#WEEK (9,3,3), KDJ.k#WEEK (9,3,3)) ,macd*1.5,'▼'),align2,COLORgreen;
月金:DRAWTEXT(CROSS( KDJ.K#MONTH (9,3,3), KDJ.D#MONTH (9,3,3)) ,MACD,'▲'),align2,COLORMAGENTA;
月死:DRAWTEXT(CROSS( KDJ.D#MONTH (9,3,3), KDJ.K#MONTH (9,3,3)) ,macd*1.5,'▼'),align2,COLORYELLOW;
LONG 26 SHORT 12 m 9
理论及用法:
①MACD在0线下方金叉时,周线KDJ在超卖区生了金叉,能走出一波劲升行情。周线KDJ是日线MACD在0线下方金叉后升势是否强劲的 过滤器 。
②MACD两曲线在0线上方金叉时,以买入为主,在0线上方附近金叉时更是如此。MACD在0线上方金叉后,后面的上升行情会比前一波上升行情升幅大,力度强。
金叉时macd2刚好向下穿更好.
LONG 26 SHORT 12 m 9
DIF:EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);
DEA:EMA(DIF,M);
MACD:2*(DIF-DEA),COLORSTICK;
MACD2:2*(DEA-DIF),COLORgreen;
A4:=BARSLAST(ref(cross(dif,dea),1));
B1:=ref(c,A4+1) c and ref(dif,A4+1) dif and cross(dif,dea);
DRAWTEXT(FILTER(B1 0,5),dif+0.2,'背离'),COLORyellow;
操盘:STICKLINE(MACD =0 AND MACD =REF(MACD,1),0,MACD,4,1),COLORRED{COLOR6058FF};
减仓:STICKLINE(MACD =0 AND MACD REF(MACD,1),0,MACD,4,0),COLORblue{COLOR6058FF};
反弹:STICKLINE(MACD 0 AND MACD =REF(MACD,1),0,MACD,4,1),COLORYELLOW{COLORFFFF00};
寻底:STICKLINE(MACD 0 AND MACD REF(MACD,1),0,MACD,4,0),COLORFFFF00;
空仓:0,COLORWHITE;
if(dif 0,dif,0),coloryellow,linethick2;
if(dif 0,0,dif),colorred,linethick2;
if(dif dea,dif,dea),COLORWHITE,linethick2;
if(dif dea,dea,dea),COLORgreen{colorff00ff},linethick2;