文华财经MACD幅图

发布日期:2024-05-19 13:45    点击次数:145

图片

  

DIF:((EMA(CLOSE,48)-EMA(CLOSE,104))),COLORWHITE;//这里的参数可以修改

DEA:EMA(DIF,9);

DIF1:((EMA(CLOSE,100)-EMA(CLOSE,200))),COLORYELLOW;//这里的参数可以修改

DEA1:EMA(DIF1,9);

DRAWICON(CROSS(DIF,DEA),DIF,'ICO108'),VALIGN0;

DRAWICON(CROSS(DEA,DIF),DIF,'ICO109'),VALIGN2;

MACD:SMA((DIF-DEA)*10,100,1);//,COLORSTICK

低位金叉:=CROSS(DIF,DEA) AND DIF<-0.1;

JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));

二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;

//STICKLINE(二次金叉,0,0.06,6,0),COLORFF00FF;

DRAWICON(二次金叉,DEA*0.9,1) ;

DRAWTEXT(二次金叉,DIF*0.95,' 二次金叉'),COLORYELLOW;

A1:=BARSLAST(REF(CROSS(DIF,DEA),1))+1;

底背离:=REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);

//STICKLINE(底背离,0,-3,6,0),COLOR00FF00;

DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;

DRAWLINE3(底背离,REF(DEA,A1),A1,底背离,DEA,0,0),COLORCYAN,LINETHICK4;

DRAWTEXT(底背离,MACD,' 底背离'),COLORFF00FF;

A2:=BARSLAST(REF(CROSS(DEA,DIF),1))+1;

顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF);

AA2:=BACKSET(顶背离,A2+1);

死叉2:=COUNT(CROSS(DEA,DIF),BARSLAST(DEA<=0));

二次死叉:=CROSS(DEA,DIF) AND DEA>0 AND COUNT(死叉2=2,21)=1;

高位死叉:=CROSS(DEA,DIF) AND DIF>0.1;

DRAWTEXT(高位死叉 AND 二次死叉 AND 顶背离,DEA*1.005,'三项跌'),COLORWHITE,LINETHICK2;

//DRAWLINE1(CROSS(A2=1,0.5),DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;

DRAWLINE3(顶背离,REF(DEA,A2),A2,顶背离,DEA,0,0),COLORGREEN,LINETHICK4;

//STICKLINE(顶背离,0,3,6,0),COLOR00FF01;

DRAWTEXT(顶背离,0.005,' 顶背离'),COLORFF00FA;

DRAWTEXT(低位金叉 AND 二次金叉 AND 底背离,DEA*0.95,'三项涨'),COLORYELLOW,LINETHICK2;

0;

STICKLINE(DEA<REF(DEA,1) ,DIF , DEA,0,1),COLORBLUE;

STICKLINE(DEA>REF(DEA,1) ,DIF , DEA,0,1),COLORRED;

STICKLINE(MACD<REF(MACD,1) AND MACD>0,MACD ,0,0,1),COLOR00FFFF;

STICKLINE(MACD>REF(MACD,1) AND MACD<0,MACD,0,0,1),COLORFF00FF;

STICKLINE(MACD<REF(MACD,1) AND MACD<0,MACD ,0,0,1),COLOR80FF00;

STICKLINE(MACD>REF(MACD,1) AND MACD>0,MACD,0,0,1),COLORRED;

DRAWICON(DIF1<REF(DIF1,1) AND DIF<REF(DIF,1),0,'ICO5');//箭头代表共振

DRAWICON(DIF1>REF(DIF1,1) AND DIF>REF(DIF,1),0,4),VALIGN0;//箭头代表共振

DRAWLINE(CROSS(DEA1,0),0,CROSS(DEA1,0),DIF,COLORMAGENTA);

DRAWLINE(CROSSDOWN(DEA1,0),0,CROSSDOWN(DEA1,0),DIF,COLORCYAN);

KTEXT(ISLASTBAR AND DIF<0 AND DIF1<0 AND DIF<DEA,0,DIF1,0,COLORGREEN,' 逢高做空   '),VALIGN2,FONTSIZE28;

KTEXT(ISLASTBAR AND DIF>0 AND DIF1>0 AND DIF>DEA,0,DIF1,0,COLORMAGENTA,' 逢低做多   '),VALIGN0,FONTSIZE28;

DRAWGBK1(DIF1<DEA1  ,RGB(10,50,10));//K

DRAWGBK1(DIF1>DEA1 ,RGB(50,10,50));

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报。