DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIF,MID),NODRAW;
MACD:=(DIF-DEA)*2,COLORSTICK;
M1:=CROSS(DIF,0);
M2:=CROSS(0,DIF);
A1:BARSLAST(M1),NODRAW;
A2:BARSLAST(M2),NODRAW;
HM1:=HHV(H,A1);
LM1:=LLV(L,A2);
AA11:IF(A1=0,BARSLAST(REF(M1,1)),DRAWNULL),NODRAW;
AAA11:REF(AA11,A1),NODRAW;
AAA111:AAA11+A1+1,NODRAW;
DEA顶:DRAWTEXT(FILTER(H=HHV(H,AAA111),10),H,\'GGGG\'),NODRAW;
M100:=CROSS(MACD,0);
M200:=CROSS(0,MACD);
A100:BARSLAST(M100),NODRAW;
A200:BARSLAST(M200),NODRAW;
HM100:=HHV(H,A100);
LM100:=LLV(L,A200);
下00:DRAWLINE(HH>20 AND HM100=H,H,LM100=L,L,0),COLORYELLOW;
上00:DRAWLINE(LM100=L AND HH>20,L,HM100=H,H,0),COLORYELLOW;
上上00:=上00=H AND 下00=H;
MACD顶0:DRAWLINE(上00=H AND 下00=H,H, BARSLAST(上上00)>0,REF(H, BARSLAST(上上00)),1),
COLORMAGENTA,NODRAW;
DRAWTEXT(CROSS(H,MACD顶0) AND MACD顶0=REF(MACD顶0,1),H,\'B\'),LINETHICK4,COLORRED;
下下00:=下00=L AND 上00=L;
MACD底0:=DRAWLINE(下00=L AND 上00=L,L, BARSLAST(下下00)>0,REF(L, BARSLAST(下下00)),1),
COLORGREEN;
DRAWTEXT(CROSS(MACD底0,L) AND MACD底0=REF(MACD底0,1),L,\'S\')COLORGREEN;
HX1:DRAWNUMBER(上00>1 AND 下00>1 AND HH>80 AND REF(上00,1)>1,H,H),NODRAW;
HX:DRAWNUMBER(下00>1 AND 上00>1 AND HH>80 AND REF(下00,1)>1,L,L),NODRAW;
下:DRAWLINE(HM1=H,H,LM1=L,L,0),COLORWHITE;
上:DRAWLINE(LM1=L,L,HM1=H,H,0),COLORWHITE;
上上:=上=H AND 下=H;
MACD顶:DRAWLINE(上=H AND 下=H,H, BARSLAST(上上)>0,REF(H, BARSLAST(上上)),1),COLORMAGENTA;
DRAWICON(CROSS(H,MACD顶) AND MACD顶=REF(MACD顶,1),H,1);
下下:=下=L AND 上=L;
MACD底:DRAWLINE(下=L AND 上=L,L, BARSLAST(下下)>0,REF(L, BARSLAST(下下)),1),COLORGREEN,NODRAW;
上上高:上上>REF(上上,1),NODRAW;
下下低:下下<REF(下下,1),NODRAW;
DRAWICON(CROSS(MACD底,L) AND MACD底=REF(MACD底,1),L,2);
DRAWICON(M2,H,2),NODRAW;
UU:=CROSS(KDJ.K,70);
DD:=CROSS(30,KDJ.K);
GG:=H>=HHV(H,BARSLAST(UU)+1) AND (BARSLAST(DD)>BARSLAST(UU));
MM:=L<=LLV(L,BARSLAST(DD)+1) AND (BARSLAST(UU)>BARSLAST(DD));
L1:=DRAWLINE(GG,H,MM, L,0),COLORGREEN;
L2:=DRAWLINE(MM,L,GG, H,0),COLORMAGENTA;
UU1:=CROSS(KDJ.K,80);
DD1:=CROSS(20,KDJ.K);
GG1:=H>=HHV(H,BARSLAST(UU1)+1) AND (BARSLAST(DD1)>BARSLAST(UU1));
MM1:=L<=LLV(L,BARSLAST(DD1)+1) AND (BARSLAST(UU1)>BARSLAST(DD1));
L11:=DRAWLINE(GG1,H,MM1, L,0),COLORBLUE;L21:=DRAWLINE(MM1,L,GG1, H,0),COLORRED;
M:=MA(C,8),LINETHICK2,COLORWHITE;
N:MA(C,34),COLORYELLOW;
A:MA(C,55),LINETHICK2,COLORMAGENTA;
MA250:MA(C,250);MA500:MA(C,500);
底部天数:IF(C<REF(L,BARSLAST(下下)),0,BARSLAST(下下)),NODRAW;
MAZC:=MA(C,底部天数);
底顶天数:IF(C<REF(L,BARSLAST(下下)),0,COUNT(上>0,底部天数)),COLORWHITE,NODRAW;
MAZC1:=MA(C,底顶天数)COLORRED;
顶部天数:IF(C>REF(H,BARSLAST(上上)),0,BARSLAST(上上)),NODRAW;
MAYL:=MA(C,顶部天数)COLORYELLOW;
顶底天数:IF(C>REF(H,BARSLAST(上上)),0,COUNT(下>0,顶部天数)),COLORYELLOW,NODRAW;
MAYL1:=MA(C,顶底天数)COLORGREEN;
AA12:=IF(A2=0,BARSLAST(REF(M2,1)),0);
AAA12:=REF(AA12,A2);
AAA112:=AAA12+A2+1;
DRAWTEXT(FILTER(L=LLV(L,AAA112),10),L,\'DDDD\'),COLORGREEN,NODRAW;
此主题相关图片如下:qq图片2015071514195722222.png
此主题相关图片如下:qq图片201507151419341111111.png