{大行情妖,墨轩启动板成妖}
{寻龙MACD副图——MACD日周月、年线共振 BY 瑞涛}
{MACD大行情}
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=2*(DIF-DEA),COLORRED;
VA1:=HHVBARS(MACD,BARSLAST(MACD<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MACD),REF(VA1,1)+2),0.5);
QG:=CROSS(BACKSET(CROSS(0,MACD) OR (ISLASTBAR AND MACD>0),REF(VA1,1)+2),0.5);
前高线:DRAWLINE(VA2,MACD,REF(VA2,1),REF(MACD,1),1),COLORMAGENTA,LINETHICK2;
MACD120:=REF(MACD/2,BARSLAST(MACD=HHV(MACD,120))),COLORA67D3D,LINETHICK1;
MACD250:REF(MACD/2,BARSLAST(MACD=HHV(MACD,250))),COLORYELLOW,LINETHICK2;
XG:=NOT(REF(MACD120,1)=MACD120);
{STICKLINE(XG,0,MACD,0,0),COLORYELLOW;}
STICKLINE(MACD>=MACD250,MACD250,MACD,2,0),COLORMAGENTA;
STICKLINE(MACD>=MACD250 AND MACD>REF(MACD,1),MACD,0,1,0),COLORYELLOW;
大行情:NOT(REF(MACD120,1)=REF(MACD250,1)) AND MACD120=MACD250;
{启动妖,墨轩启动板成妖}
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(DIF4>=-0.01,5)=5;
DRAWTEXT(启动妖,MACD250*1.3,'妖'),COLORRED;