AA:=MAX(DYNAINFO(3),DYNAINFO(5));
CC:=MIN(DYNAINFO(3),DYNAINFO(6));
DD:=AA-CC;
EE:=CC+DD*7/8;
GG:=CC+DD*0.5/8;
DRAWICON(LONGCROSS(GG,CLOSE,2),CLOSE,1);
DRAWICON(LONGCROSS(CLOSE,EE,2),CLOSE,2);
M1:=DYNAINFO(4);
M2:=DYNAINFO(5);
M3:=DYNAINFO(6);
M4:=AMOUNT/V;
M5:=CLOSE;
M6:=COUNT(M5,5);
M7:=SUM(VOL*CLOSE,0)/SUM(VOL,0);
M8:=MA(M5,M6);
M9:=M8+2*STD(M5,3);
M10:=M8-2*STD(M5,3);
DRAWICON(CROSS(M7,M8),M7,38);
M12:=M5/REF(CLOSE,1)>1.02;
M13:=M5/REF(CLOSE,1)<0.98;
M14:=(HHV(M5,M6)-LLV(M5,M6))/M5<0.05;
M15:=SMA(VOL,30,1);
M16:=(M15-LLV(LLV(M15,1),30))/(HHV(HHV(M15,1),30)-LLV(LLV(M15,1),30))>0.95;
M17:=M12 OR M13;
M18:=M17=0 AND M14 AND M16 AND CROSS(M7,M8);
DRAWICON(FILTER(M18,10),M7,3),COLORYELLOW;
M19:=M17=0 AND M14 AND M16 AND CROSS(CLOSE,M7) AND CROSS(CLOSE,M8);
DRAWICON(FILTER(M19,10),M7*0.99,4),COLORRED;
M30:=MA(C,30),COLORBROWN;
M60:MA(C,60),COLORFF00FF;
M120:MA(C,120),COLORRED;
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,27);
GJ:=MAX(C,O);
L4:=LLV(GJ,4);
GT:=DEA>REF(DEA,1) AND REF(DEA,1)<REF(DEA,2);
A1:=BARSLAST(REF(GT,1));
底背离:=REF(L4,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND GT;
H4:=HHV(GJ,4);
GT2:=DEA<REF(DEA,1) AND REF(DEA,1)>REF(DEA,2);
A2:=BARSLAST(REF(GT2,1));
顶背离:=REF(H4,A2+1)<H4 AND DIFF<REF(DIFF,A2+1) AND GT2,COLORLIBLUE;
DRAWTEXT(底背离,M30,'底背离'),COLORFF00FF;
DRAWTEXT(顶背离,M30,'顶背离'),COLORLIBLUE;
|