{日周月趋势}
月DIF:=(EMA(CLOSE,12*4*4)-EMA(CLOSE,26*4*4));
月DEA:=EMA(月DIF,9*4*4);
月macd:=2*(月DIF-月DEA);
周DIF:=(EMA(CLOSE,12*4)-EMA(CLOSE,26*4));
周DEA:=EMA(周DIF,9*4),COLORWHITE,DOTLINE;
周MacD:=2*(周DIF-周DEA);
日DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26));
日DEA:=EMA(日DIF,9);
日MACD:=2*(日DIF-日DEA),COLORWHITE;
{MACD年线共振色带}
STICKLINE(月MACD>REF(月MACD,1),REF(MACD/2,BArslAST(MACD=HHV(MACD,250))),0,5,0),COLOR660088;
STICKLINE(月MACD<REF(月MACD,1),REF(MACD/2,BARSLAST(MACD=HHV(MACD,250))),0,5,0),COLOR003300;
DRAWBAND(EMA(周MACD,10),RGB(0,0,180), 周MACD,RGB(255,255,0));
{MACD柱}
STICKLINE(MACD>0 AND MACD>REF(MACD,1),0,MACD,1,0),COLORYELLOW;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),0,MACD,1,0),COLORLIBLUE;
STICKLINE(MACD<0,0,MACD,1,0),COLORGREEN;
{MACD年线加强柱}
STICKLINE(MACD>=REF(MACD/2,BARSLAST(MACD=HHV(MACD,250))),REF(MACD/2,BARSLAST(MACD=HHV(MACD,250))),MACD,2,0),COLORAA00CC;
股价趋势:MACD,COLORAACCEE,LINETHICK2;
行情启动:REF(MACD/2,BARSLAST(MACD=HHV(MACD,250))),COLOR0000EE,LINETHICK2;
{成妖}
DIF4:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA4:=EMA(DIF4,9);
ZTB:=C>INTPART(REF(C,1)*(1+10/100)/0.01+0.5)*0.01-0.006 AND C=H;
启动版:=DIF4>-0.2 AND DIF4<0.35 AND ZTB AND REF(ZTB,1)<1 AND COUNT(EMA(CLOSE,12)-EMA(CLOSE,26)>=-0.01,5)=5;
DRAWTEXT(启动版,REF(MACD/2,BARSLAST(MACD=HHV(MACD,250)))*1.185,'--妖来了'),COLOREE9900;
DRAWTEXT(启动版,REF(MACD/2,BARSLAST(MACD=HHV(MACD,250)))*1.185,'↙'),COLORYELLOW;