【通達(dá)信】MACD+KDJ+RSI提前共振指標(biāo)公式
攻城獅 2016.03.27 02:52
DIF:=(2*EMA(CLOSE, 12)-EMA(EMA(CLOSE,12),12))-(2*EMA(CLOSE, 26)-EMA(EMA(CLOSE, 26),26));
DEA:=2*EMA(DIF, 9) – EMA(EMA(DIF, 9),9);
MACD1:3*(DIF-DEA)COLORSTICK;
MACD2:=EMA(MACD1,3);
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,3,0),COLORRED;
STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,3,0),COLORGREEN;
STICKLINE(MACD1STICKLINE(MACD1>=0 OR MACD1<=0,0,0,50,1),COLORWHITE;
DIF,COLOR33FF33,LINETHICK2;
DEA,COLORYELLOW,LINETHICK2;
MACD:=MACD1,NODRAW,COLORMAGENTA;
強(qiáng):=IF(DIF>=DEA,DIF,DRAWNULL),COLORRED,LINETHICK2;
弱:=IF(DEA>=DIF,DEA,DRAWNULL),COLORFF9900,LINETHICK2;
DRAWICON(CROSS(DIF,DEA),DIF-0.2,1);
DRAWICON(CROSS(DEA,DIF),DEA+0.2,2);
A1:=BARSLAST(REF(CROSS(“MACD.DIF”,”MACD.DEA”),1));
B1:=REF(C,A1+1)>C AND REF(“MACD.DIF”,A1+1)<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA");
{DRAWTEXT(B1>0,-0.05,’MACD底背’),COLORFF00FF;}
A2:=BARSLAST(REF(CROSS(“KDJ.K”,”KDJ.D”),1));
B2:=REF(C,A2+1)>C AND REF(“KDJ.K”,A2+1)<"KDJ.K" AND CROSS("KDJ.K","KDJ.D");
{DRAWTEXT(B2,-0.08,’KDJ底離’),COLORYELLOW;}{KDJ底背離};
A3:=BARSLAST(REF(CROSS(“RSI.RSI1″,”RSI.RSI2”),1));
B3:=REF(C,A3+1)>C AND REF(“RSI.RSI1”,A3+1)<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2");
{DRAWTEXT(B3>0,-0.1,’RSI底離’),COLORCYAN;}{RSI底背離};
C1:=BARSLAST(REF(CROSS(“MACD.DEA”,”MACD.DIF”),1));
D1:=REF(C,C1+1)“MACD.DIF” AND CROSS(“MACD.DEA”,”MACD.DIF”);
{DRAWTEXT(D1>0,0.05,’MACD頂離’),COLORBLUE;}{MACD頂背離}
C2:=BARSLAST(REF(CROSS(“KDJ.D”,”KDJ.K”),1));
D2:=REF(C,C2+1)“KDJ.K” AND CROSS(“KDJ.D”,”KDJ.K”);
{DRAWTEXT(D2>0,0.1,’KDJ頂離’),COLORLIGRAY;}{KDJ頂背離}
C3:=BARSLAST(REF(CROSS(“RSI.RSI2″,”RSI.RSI1”),1));
D3:=REF(C,C3+1)“RSI.RSI1” AND CROSS(“RSI.RSI2″,”RSI.RSI1”);
{m.chiang1015.com 概念股網(wǎng)_通達(dá)信股票指標(biāo)公式}
{DRAWTEXT(D3>0,0.2,’RSI頂離’),COLORGREEN;}{RSI頂背離};
DD:=C=HHV(C,180);
EE:=DEA< REF(DEA,1) AND REF(DEA< REF(DEA,1),1)=1;
CC:=C> REF(C,1) AND REF(C> REF(C,1),1)=1;
上升背離:(CC AND EE)*DEA,COLOR00FFFF;
頂背離:(DD AND EE AND DEA< HHV(DEA,180))*DEA,STICK,LINETHICK3,COLORGREEN;
FF:=C=LLV(C,180);
GG:= DEA> REF(DEA,1) AND REF(DEA> REF(DEA,1),1)=1;
LL:=C< REF(C,1) AND REF(C< REF(C,1),1)=1;
下降背離:(LL AND GG)*DEA,COLORMAGENTA;
底背離:(FF AND GG AND DEA> LLV(DEA,180))*DEA,STICK,LINETHICK3,COLORRED;
申明:本文為作者投稿或轉(zhuǎn)載,在概念股網(wǎng) http://m.chiang1015.com/ 上發(fā)表,為其獨(dú)立觀點(diǎn)。不代表本網(wǎng)立場,不代表本網(wǎng)贊同其觀點(diǎn),亦不對其真實(shí)性負(fù)責(zé),投資決策請建立在獨(dú)立思考之上。