Home >  > MACD背驰公式

MACD背驰公式

0

新测可用:

0,COLOR00FFFF;
2,COLOR0000EE;
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
LC:=REF(C,1);
RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);
底背离MACD:STICKLINE(FILTER(B1>0,5),0,0.75,3,0),COLOR00FF00;
DRAWTEXT(FILTER(B1>0,5),0.57,'底背离MACD'),COLOR00FF00;
A2:=BARSLAST(REF(CROSS(K,D),1));
B2:=REF(C,A2+1)>C AND REF(K,A2+1)<K AND CROSS(K,D);
M:if(FILTER(B1>0,5),0.75,0),COLOR00FF00;
底背离KDJ:STICKLINE(FILTER(B2>0,5),0,1,3,0),COLOR00FFFF;
DRAWTEXT(FILTER(B2>0,5),0.80,'底背离KDJ'),COLOR00FFFF;
A3:=BARSLAST(REF(CROSS(RSI1,RSI2),1));
B3:=REF(C,A3+1)>C AND REF(RSI1,A3+1)<RSI1 AND CROSS(RSI1,RSI2);
J:if(FILTER(B2>0,5),1,0),COLOR00FFFF;
底背离RSI:STICKLINE(FILTER(B3>0,5),0,0.5,3,0),COLORFFFF00;
DRAWTEXT(FILTER(B3>0,5),0.25,'底背离RSI'),COLORFFFF00;
C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));
D1:=REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF);
R:if(FILTER(B3>0,5),0.5,0),COLORFFFF00;
顶背离MACD:STICKLINE(FILTER(D1>0,5),2,1.25,3,0),COLOR00CCFF;
DRAWTEXT(FILTER(D1>0,5),1.47,'顶背离MACD'),COLOR00CCFF;
C2:=BARSLAST(REF(CROSS(D,K),1));
D2:=REF(C,C2+1)<C AND REF(K,C2+1)>K AND CROSS(D,K);
顶背离KDJ:STICKLINE(FILTER(D2>0,5),2,1,3,0),COLOR0000EE;
DRAWTEXT(FILTER(D2>0,5),1.2,'顶背离KDJ'),COLOR0000EE;
C3:=BARSLAST(REF(CROSS(RSI2,RSI1),1));
D3:=REF(C,C3+1)<C AND REF(RSI1,C3+1)>RSI1 AND CROSS(RSI2,RSI1);
顶背离RSI:STICKLINE(FILTER(D3>0,5),2,1.5,3,0),COLOREE00EE;
DRAWTEXT(FILTER(D3>0,5),1.75,'顶背离RSI'),COLOREE00EE;

在“公式管理器”--“技术指标公式”添加。指标还算准,不过不能反映每一个背驰,效果如图:

Snap87

暧昧帖

发表评论

*

*