{公式名称: 佛山}
{副图}
DRAWGBK(OPEN 0,RGB(0,0,250),RGB(0,0,0),0,33,0);
VAR1:=EMA(DCLOSE,12)-EMA(DCLOSE,26);
VAR2:=EMA(VAR1,9);
VAR3:=(VAR1-VAR2)*2;
A1:BARSLAST(VAR1 REF(VAR1,1)),COLORYELLOW;
A11:A1*(-1),COLORYELLOW;
A2:BARSLAST(VAR2 REF(VAR2,1)),COLORRED;
A22:A2*(-1),COLORRED;
DRAWBAND(A2,RGB(150,50,20),A1,RGB(150,100,150));
DRAWBAND(A22,RGB(150,100,150),A11,RGB(150,50,20));
STICKLINE(CROSS(VAR1,VAR2) AND VAR1 0,A11,0,2,0),COLORRED;
STICKLINE(CROSS(VAR1,VAR2) AND VAR1 0,0,A1,2,0),COLORRED;
STICKLINE(CROSS(VAR2,VAR1) AND VAR1 0,A11,0,2,0),COLORBLUE;
STICKLINE(CROSS(VAR2,VAR1) AND VAR1 0,0,A1,2,0),COLORBLUE;
MACD底背离:STICKLINE(REF(CLOSE,A1+1) CLOSE AND VAR1 REF(VAR1,A1+1) AND CROSS(VAR1,VAR2),(-25),25,0.00001,0),COLORYELLOW;
STICKLINE(A1 0 AND A2 0,A2,A1,0.00001,0),COLORWHITE;
STICKLINE(A1 0 AND A2 0,A22,A11,0.00001,0),COLORWHITE;
STICKLINE(A1 0 AND A2 0,0,A1,0.000001,0),COLORMAGENTA;
STICKLINE(A1 0 AND A2 0,0,A11,0.000001,0),COLORGREEN;
DRAWTEXT(CROSS(VAR1,VAR2) AND VAR1 0,(-5),34),COLORCYAN;
DRAWTEXT(CROSS(VAR1,VAR2) AND VAR1 0,(-12),34),COLORCYAN;
DRAWTEXT(CROSS(VAR1,VAR2) AND VAR1 0,5,34),COLORGREEN;
DRAWTEXT(CROSS(VAR1,VAR2) AND VAR1 0,12,34),COLORGREEN;
DRAWTEXT(A2 A1 AND A22 A11 AND A1=0 AND A11=0,A2,35),COLORGREEN;
DRAWTEXT(A2 A1 AND A22 A11 AND A1=0 AND A11=0,0,35),COLORGREEN;
DRAWTEXT(A2 A1 AND A22 A11 AND A1=0 AND A11=0,A22,35),COLORGREEN;
STICKLINE(CROSS(VAR1,VAR2) AND VAR1 0,A11,0,2,0),COLORRED;
STICKLINE(CROSS(VAR1,VAR2) AND VAR1 0,0,A1,2,0),COLORRED;
STICKLINE(CROSS(VAR2,VAR1) AND VAR1 0,A11,0,2,0),COLORBLUE;
STICKLINE(CROSS(VAR2,VAR1) AND VAR1 0,0,A1,2,0),COLORBLUE;