MACD指标
MID:=MA(C,20);
VART1:=POW((C-MID),2);
VART2:=MA(VART1,20);
VART3:=SQRT(VART2);
UPPER:=MID+2*VART3;
LOWER:=MID-2*VART3;
WIDTH:(UPPER-LOWER)/MID,COLORYELLOW;
MA6:MA(WIDTH,6),COLORWHITE;
MACD:(WIDTH-MA6)*2,NODRAW;
W1:STICKLINE(MACD>0.015,MACD,0,3,1),COLORRED;
W2:STICKLINE(MACD<-0.015,MACD,0,3,1),COLORCYAN;
条件选股公式
MID:=MA(C,20);
VART1:=POW((C-MID),2);
VART2:=MA(VART1,20);
VART3:=SQRT(VART2);
UPPER:=MID+2*VART3;
LOWER:=MID-2*VART3;
WIDTH:=(UPPER-LOWER)/MID;
MA6:=MA(WIDTH,6);
MACD:=(WIDTH-MA6)*2;
xg:MACD>0.015;
|