当前位置:分析家公式网 → 股票公式 → 通达信公式 → 一键转帖:MACD背离 荆州量学金融终端分时副图一
软件名称:[B]MACD背离 荆州量学金融终端分时副图一[/B]
软件类型:国产软件
运行环境:Win9X/Win2000/WinXP/Win2003/Win7/
软件语言:简体中文
授权方式:免费版
软件大小:3.00 KB
官方主页:Home Page
更新时间:2018-08-04 01:02:58
软件简介:
MACD背离
SHORT:=12;
LONG:=26;
MID:=9;
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIF,MID);
MACD:(DIF-DEA)*2,COLORSTICK;
IF(DIF>DEA,DIF,DRAWNULL)COLORRED,LINETHICK2;
{0,COLORWHITE,DOTLINE;}
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");
DRAWICON(B1>0,LLV(DIF,60)*0.84,1);
DRAWTEXT(B1>0,LLV(DIF,60)*0.85,'..MACD'),COLORGREEN;{MACD底背离}
C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1));
D1:=REF(C,C1+1)<C AND REF("MACD.DIF",C1+1)>"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF");
DRAWICON(D1>0,HHV(DIF,60)*0.84,2);
DRAWTEXT(D1>0,HHV(DIF,60)*0.85,'..MACD'),COLORRED;{MACD顶背离}
JC:=DEA-DIF;
绿柱:=IF(MACD<0,SUM(MACD,BARSLAST(JC<0)),0);
红柱:=IF(MACD>0,SUM(MACD,BARSLAST(JC>0)),0);
本次最低价:=LLV(L,BARSLAST(JC<0));
本次最高价:=HHV(H,BARSLAST(JC>0));
X1:=IF (MACD<0,BARSLAST(CROSS(DIF,DEA)),0);
前次绿柱:=REF(绿柱,X1+1);{WWW.70822.com}
前次最低价:=REF(本次最低价,X1+1);
Y1:=IF((绿柱<0 AND ABS(绿柱)<ABS(前次绿柱)
AND 本次最低价<前次最低价),1,0);
RS1:= MACD<0 AND REF(MACD,1)<0 AND C<前次最低价
AND ABS(绿柱)<ABS(前次绿柱) AND ABS(MACD)<ABS(REF(MACD,1));
底背驰:=IF (CROSS(DIF,DEA),REF(Y1,1),0);
DRAWICON(底背驰,LLV(DIF,60)*0.1,1);
DRAWTEXT(底背驰,LLV(DIF,60)*0.1,'..柱'),COLORGREEN;{柱底背离}
X2:=IF(MACD>0,BARSLAST(CROSS(DEA,DIF)),0);
前次红柱:=REF(红柱,X2+1);
前次最高价:=REF(本次最高价,X2+1);
Y2:=IF((红柱>0 AND 红柱<前次红柱 AND 本次最高价>前次最高价),1,0);
RS2:=MACD>0 AND REF(MACD,1)>0 AND C>前次最高价 AND ABS(红柱)<ABS(前次红柱) AND ABS(MACD)<ABS(REF(MACD,1));
顶背驰:=IF(CROSS(DEA,DIF),REF(Y2,1),0);
DRAWICON(顶背驰,HHV(DIF,60)*0.1,2);
DRAWTEXT(顶背驰,HHV(DIF,60)*0.1,'..柱'),COLORRED;{柱顶背离}
{ 以下是可能出现的变盘点,关注 }{WWW.70822.com}
STICKLINE(COUNT(DIF>DEA,BARSLAST(CROSS(DIF,DEA))+1)= 7,0,MACD,0.5,0),COLORGREEN;
STICKLINE(COUNT(DIF>DEA,BARSLAST(CROSS(DIF,DEA))+1)=15,0,MACD,0.5,0),COLORGREEN;
STICKLINE(COUNT(DIF>DEA,BARSLAST(CROSS(DIF,DEA))+1)=28,0,MACD,0.5,0),COLORGREEN;
STICKLINE(COUNT(DIF>DEA,BARSLAST(CROSS(DIF,DEA))+1)=36,0,MACD,0.5,0),COLORGREEN;
STICKLINE(COUNT(DIF>DEA,BARSLAST(CROSS(DIF,DEA))+1)=48,0,MACD,0.5,0),COLORGREEN;
STICKLINE(COUNT(DIF<DEA,BARSLAST(CROSS(DIF,DEA))+1)= 7,0,MACD,0.5,0),COLORRED;
STICKLINE(COUNT(DIF<DEA,BARSLAST(CROSS(DIF,DEA))+1)=15,0,MACD,0.5,0),COLORRED;
STICKLINE(COUNT(DIF<DEA,BARSLAST(CROSS(DIF,DEA))+1)=28,0,MACD,0.5,0),COLORRED;
STICKLINE(COUNT(DIF<DEA,BARSLAST(CROSS(DIF,DEA))+1)=36,0,MACD,0.5,0),COLORRED;
STICKLINE(COUNT(DIF<DEA,BARSLAST(CROSS(DIF,DEA))+1)=48,0,MACD,0.5,0),COLORRED;
[url=http://www.70822.com/soft/sort013/sort05/down-127086.html]MACD背离 荆州量学金融终端分时副图一[/url]