
主力持仓:EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3),COLORMAGENTA,LINETHICK2;
警戒线: 80,COLORYELLOW;
VDCO1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VDCO2:=SMA(ABS(LOW-VDCO1),13,1)/SMA(MAX(LOW-VDCO1,0),10,1);
VDCO3:=EMA(VDCO2,10);
VDCO4:=LLV(LOW,33);
VDCO5:=EMA(IF(LOW<=VDCO4,VDCO3,0),3);
STICKLINE(VDCO5>REF(VDCO5,1),0,VDCO5,3,0 ),COLOR000055;
DRAWTEXT_FIX(1,0.980,0,1,
'公众号:爱指标源码,应有尽有'),COLOR666666;
STICKLINE(VDCO5>REF(VDCO5,1),0,VDCO5,2.6,0 ),COLOR000077;
STICKLINE(VDCO5>REF(VDCO5,1),0,VDCO5,2.1,0 ),COLOR000099;
STICKLINE(VDCO5>REF(VDCO5,1),0,VDCO5,1.5,0 ),COLOR0000BB;
STICKLINE(VDCO5>REF(VDCO5,1),0,VDCO5,0.9,0 ),COLOR0000DD;
STICKLINE(VDCO5>REF(VDCO5,1),0,VDCO5,0.3,0 ),COLOR0000FF;
STICKLINE(VDCO5<REF(VDCO5,1),0,VDCO5,3,0),COLOR005500;
STICKLINE(VDCO5<REF(VDCO5,1),0,VDCO5,2.6,0),COLOR007700;
STICKLINE(VDCO5<REF(VDCO5,1),0,VDCO5,2.1,0),COLOR009900;
STICKLINE(VDCO5<REF(VDCO5,1),0,VDCO5,1.5,0),COLOR00BB00;
STICKLINE(VDCO5<REF(VDCO5,1),0,VDCO5,0.9,0),COLOR00DD00;
STICKLINE(VDCO5<REF(VDCO5,1),0,VDCO5,0.3,0),COLOR00FF00;
主力出没:IF(VDCO5>REF(VDCO5,1),VDCO5,0),COLORRED,NODRAW;
洗盘:IF(VDCO5<REF(VDCO5,1),VDCO5,0),COLORGREEN,NODRAW;
VAR1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));
VARD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2));
VARE:=(REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VARF:=(REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR10:=(REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR11:=(REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR12:=(REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR13:=(REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR14:=(REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR15:=(REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR16:=(REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR17:=(REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR18:=(REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
DRAWTEXT_FIX(C>O,0.01,0.01,0,'公众号:爱指标源码,应有尽有'),COLORYELLOW;
VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR
VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9),COLORFFFF00;
MACD:=(DIFF-DEA)*2;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF> REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
顶背离:=REF(CLOSE,A2+1)< CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
④:IF(底背离,57,0),LINETHICK3,COLORBROWN;
DRAWTEXT(底背离,15,'←MACD 底背离'),COLORWHITE;
DRAWTEXT(顶背离,70,'←MACD 顶背离'),COLORGREEN;