DEA:=EMA(DIFF,N*9),COLOR000088;
MACD:=2*(DIFF-DEA);
MACDX:=MACD;
MACDO:=EMA(MACD,5),COLORFF77FF;
DIFFO:=EMA(DEA,P)*1.8;
B:=MACD-REF(MACD,1);
STICKLINE(MACD 0 AND B 0,0,MACD,0,1),COLOR0000CD;
STICKLINE(MACD 0 AND B 0,0,MACD,0,0),COLOR0000CD;
STICKLINE(MACD 0 AND B 0,0,MACD,0,1),COLORCYAN;
STICKLINE(MACD 0 AND B 0,0,MACD,0,0),COLORCYAN;
STICKLINE(DIFF DEA,DIFF,DEA,4,0),COLOR0089FF;
STICKLINE(DIFF DEA,DIFF,DEA,4,0),COLORBLUE;
发现机构入场:PARTLINE(DIFF =REF(DIFF,1) AND DEA REF(DEA,1),DIFF),COLOR00C500,LINETHICK4;
短线出局:PARTLINE(DIFF REF(DIFF,1) AND DEA REF(DEA,1),DIFF),COLORYELLOW,LINETHICK4;
PARTLINE(DIFF =REF(DIFF,1) AND DEA REF(DEA,1),DIFF),COLORGRAY;
PARTLINE(DIFF REF(DIFF,1) AND DEA REF(DEA,1),DIFF),COLORBLUE;
PARTLINE(DIFFO =REF(DIFFO,1),DIFFO),COLORYELLOW;
PARTLINE(DIFFO=REF(DIFFO,1),DIFFO),COLORYELLOW;
PARTLINE(DIFFO REF(DIFFO,1),DIFFO),COLORMAGENTA;
DRAWTEXTEX(C O,1,10,50,'操作:蓝转绿试买;见橙加仓;维持橙持股'),COLOR008987;
DRAWTEXTEX(C O,1,300,50,'橙转黄减仓;蓝色空仓'),COLOR008987;