DIFF:=EMA(CLOSE,N1)-EMA(CLOSE,N2);
DEA:=EMA(DIFF,N3);
MACD:2*(DIFF-DEA),COLOR0088F5,LINETHICK2;
MACDMA:=MA(MACD,N1);
中轴:0,COLORYELLOW;
STICKLINE(MACD,MACD,0,3,1),COLORWHITE;
STICKLINE(MACD<0 AND MACD<MACDMA,MACD,MACDMA,3,0),COLORGREEN;
STICKLINE(MACD>MACDMA AND MACD>0,MACD,MACDMA,3,0),COLORRED;
DIF2:=EMA(CLOSE,N4)-EMA(CLOSE,N3);
DEA2:=EMA(DIF2,N4);
STICKLINE(DEA2>=0,DEA2,0,2,1),COLOR33AA33;
STICKLINE(DEA2<0,DEA2,0,2,0),COLORF580F5;
STICKLINE(DIF2<0,DIF2,0,2,1),COLOR33AA33;
STICKLINE(DIF2>=0,DIF2,0,2,0),COLORF580F5;
介入:MACD,STICK,COLORF560F5;
MA5:=MA(CLOSE,5);
MA10:=MA(CLOSE,10);
MA20:=MA(CLOSE,20);
MA30:=MA(CLOSE,30);
MA60:=MA(CLOSE,60);
MA120:=MA(CLOSE,120);
ANGEL:=EMA(C,2);
DEVIL:=EMA(SLOPE(C,21)*20+C,42);
AA:=CROSS(ANGEL,DEVIL);
BB:=CROSS(DEVIL,ANGEL);
DRAWTEXT(AA,-1,'买'),COLORF00FF0,LINETHICK3;
DRAWTEXT(BB,1,'卖'),COLORBLUE,LINETHICK3; 这就是准确介入副图的源码 |