三级MACD
指标功能:[B]国产软件[/B]
指标类型:简体中文
所需积分:0
推荐星级:
授权方式:共享版
公式大小:0 Bytes
更新时间:2012-04-22 08:57:00
公式简介:
{N:1,50,5(倍数可调)}
DIFF2:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA2:=EMA(DIFF2,9);
DIFF5:=EMA(CLOSE,12*N) - EMA(CLOSE,26*N);
DEA5:=EMA(DIFF5,9*N);
MACD5:=2*(DIFF5-DEA5);
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26),COLORMAGENTA,LINETHICK1;
DEA:=EMA(DIFF,9),COLOR00FFFF,LINETHICK1;
MACD:=2*(DIFF-DEA);
STICKLINE(MACD5>0 AND MACD5>REF(MACD5,1),MACD5,0,4,0),COLORFF6666;
STICKLINE(MACD5>0 AND MACD5<REF(MACD5,1),MACD5,0,4,0),COLORLIBLUE;
STICKLINE(MACD5<0 AND MACD5<REF(MACD5,1),MACD5,0,4,0),COLOR888888;
STICKLINE(MACD5<0 AND MACD5>REF(MACD5,1),MACD5,0,4,0),COLORLIGRAY;
DRAWBAND(DEA5,RGB(0,0,250),DIFF5,RGB(0,150,00));
DRAWBAND(DEA,RGB(250,250,0),DIFF,RGB(0,180,00));
STICKLINE(MACD>0 ,MACD,0,0,0),COLORMAGENTA;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,0,1),COLORCYAN;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,0,0),COLORCYAN;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,0,0),COLORMAGENTA;
DRAWBAND(DEA2,RGB(250,250,250),DIFF2,RGB(250,0,0));
DIFF1:=DIFF,COLORMAGENTA,LINETHICK1;
DEA1:=DEA,COLORYELLOW,LINETHICK1;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
A22:=BARSLAST(REF(CROSS(DEA,DIFF),1));
B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);
C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));
D1:=REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF);
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
顶背离:=REF(CLOSE,A22+1)<CLOSE AND REF(DIFF,A22+1)>DIFF AND CROSS(DEA,DIFF);
{DRAWTEXT(顶背离,DEA*1.05,' 顶离'),COLORWHITE;
DRAWTEXT(底背离,DEA*0.95,' 底背'),COLORRED;}
A51:=BARSLAST(REF(CROSS(DIFF5,DEA5),1));
A522:=BARSLAST(REF(CROSS(DEA5,DIFF5),1));
B51:=REF(C,A51+1)>C AND REF(DIFF5,A51+1)<DIFF5 AND CROSS(DIFF5,DEA5);
C51:=BARSLAST(REF(CROSS(DEA,DIFF),1));
D51:=REF(C,C51+1)<C AND REF(DIFF5,C51+1)>DIFF5 AND CROSS(DEA5,DIFF5);
底离:=REF(CLOSE,A51+1)>CLOSE AND DIFF>REF(DIFF,A51+1) AND CROSS(DIFF,DEA);
顶离:=REF(CLOSE,A522+1)<CLOSE AND REF(DIFF5,A522+1)>DIFF5 AND CROSS(DEA5,DIFF5);
DRAWTEXT(底离,DEA5*1.02,' 5底背'),COLORFF00FF;
DRAWTEXT(顶离,DEA5*0.98,' 5顶离'),COLOR00FF00;
JCCOUNT:=COUNT(CROSS(DIFF1,DEA1),BARSLAST(DEA1>=0));
二次金叉:=CROSS(DIFF1,DEA1) AND DEA1<0 AND COUNT(JCCOUNT=2,55)=1;
低位金叉:=CROSS(DIFF1,DEA1) AND DIFF1<-0.1;
DRAWTEXT(低位金叉 AND 二次金叉 AND 底背离,+0.04,'全3项'),COLOR00FFFF,LINETHICK1;
JCCOUNT1:=COUNT(CROSS(DIFF5,DEA5),BARSLAST(DEA5>=0));
二次金叉5:=CROSS(DIFF5,DEA5) AND DEA5<0 AND COUNT(JCCOUNT1=2,55)=1;
低位金叉5:=CROSS(DIFF5,DEA5) AND DIFF5<-0.1;
DRAWTEXT(低位金叉5 AND 二次金叉5 AND 底背离,+0.02,'5分钟三项'),COLOR00FFFF,LINETHICK1;
DIFF日:EMA(CLOSE,12/N) - EMA(CLOSE,26/N),COLORYELLOW,LINETHICK1;
DEA日:EMA(DIFF日,9/N),COLORYELLOW,LINETHICK1;
IF(DEA日>=REF(DEA日,1),DEA日,DRAWNULL),COLORRED,LINETHICK2;
IF(DEA日>=REF(DEA日,1),DEA日,DRAWNULL)POINTDOT,COLOR3366FF,LINETHICK4;
R1A:=低位金叉5 AND 二次金叉5 AND 底离;
DRAWICON(R1A,DEA5,25);
R1B:= 顶离 AND DEA5>0;
DRAWICON(R1B,DEA5,24);
R2A:= 底背离;
DRAWICON(R2A,DIFF,1);
R2B:= 顶背离 AND DEA>0;
DRAWICON(R2B,DIFF,2);
[url=http://www.goodgupiao.com/gupiaogongshi/19486.html][B]三级MACD[/B][/url]