DIFF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIFF,9);
:2*(DIFF-DEA),COLORSTICK;
PARTLINE(dea,dea REF(dea,1),RGB(255,255,255),deaPARTLINE(DIFF,DIFF =REF(DIFF,1),RGB(255,0,0),DIFFDRAWGBKLAST(DEA 0,STRIP(RGB(90,0,0),RGB(10,150,0),0))andDRAWGBKLAST(dea 0,STRIP(RGB(0,128,128),RGB(25,25,112),0));
日金:DRAWTEXT(CROSS(DIFF,DEA),MACD, #39;上 #39;),align2,COLORred;
日死:DRAWTEXT(CROSS(DEA,DIFF),macd*1.5, #39;下 #39;),align2,COLORgreen;
DRAWTEXTABS(3,1, #39;DIFF翻红,结合增仓及多头抓主升。 #39;),linethick1,Color00ffff;
DRAWTEXTABS(3,16, #39;DIFF泛绿时持币,宁缺毋滥。 #39;),linethick1,Color00ffff;
DRAWTEXTREL(460,950, #39;理想专用 #39;),Color4B4B4B,LAYER4,LINETHICK3;
个股:c,linethick2,LAYER0,PRECIS2;
PARTLINE(c,c ref(c,1),rgb(250,0,0),c ref(c,1),rgb(0,250,0)),linethick2,LAYER0;
DIFF:EMA(CLOSE,10)-EMA(CLOSE,30);
DEA:EMA(DIFF,5);
MACD=2*(DIFF-DEA);
Zero:0;
gj:=MAX(C,O);
STICKLINE(MACD 0ANDMACD =REF(MACD,1),0,MACD,2,0),color0000ff;
STICKLINE(MACD 0ANDMACDSTICKLINE(MACD 0ANDMACD =REF(MACD,1),0,MACD,2,0),colorff00ff;
STICKLINE(MACD 0ANDMACDL4:=LLV(gj,4);
jl:=(HHV(diff,55)-LLV(diff,55))/5;
gt:=dea REF(dea,1)ANDREF(dea,1)A1:=BARSLAST(REF(gt,1));
底:=REF(L4,A1+1) CLOSEANDdiff REF(diff,A1+1)ANDgt;
DRAWLINE(A1=0,DEA,底背离,REF(DEA,A1),0),colorred,LINETHICK2;
DRAWLINE(底背离,DEA,底背离,REF(DEA,A1),0),colorred,LINETHICK2;
DRAWTEXT(底背离,REF(DEA,A1)*1.18, #39;底背离 #39;),COLORFF00FF;
H4:=HHV(gj,4);
gt2:=deaREF(dea,2);
A2:=BARSLAST(REF(gt2,1));
顶背离:=REF(H4,A2+1)
DRAWLINE(A2=0,DEA,顶背离,REF(DEA,A2),0),colorgreen,LINETHICK2;
DRAWLINE(顶背离,DEA,顶背离,REF(DEA,A2),0),colorgreen,LINETHICK2;
DRAWTEXT(顶背离,REF(DEA,A2)*1.18, #39;顶背离 #39;),colorgreen;
A0:=DIFF 0ANDDEA 0;
A11:=A0 REF(A0,1);
A3:=BARSLAST(A11);
A4:=COUNT(DEA 0ANDDIFF 0,A3)=0;
A5:=CROSS(DIFF,DEA);
A6:=BARSLAST(A5);
A7:=REF(A6,A6+1)+A6;
A8:=(DIFF+DEA)/2;
A9:=(HIGH+LOW)/2;
A10:=A5ANDA7REF(A8,A7)ANDA90;
DRAWTEXT(A10,DIFF*0.95, #39;★买入 #39;),coloryellow;