A:=(3*C+L+O+H)/6;
MA5:MA(A,5);
XL1:=(2*C+H+L)/4;
XL2:=LLV(LOW,34);
XL3:=HHV(HIGH,34);
XL4:=EMA((XL1-XL2)/(XL3-XL2)*XL3,7);
XL5:=EMA(0.667*REF(XL4,2)+0.333*XL4,1);
XL6:=crOSS(XL4,MA(XL4,10));
L1:=(INDEXC-HHV(INDEXC,8))/HHV(INDEXC,8)<-0.05 AND MA(INDEXA,125)/MA(INDEXV,125)/(MA(INDEXA,5)/MA(INDEXV,5))>1.12;
L2:=BArslAST(L1)<13;
L3:=(CLOSE-MA(CLOSE,58))/MA(CLOSE,58)<-0.07;
X1:=EMA(SLOPE(CLOSE,21)*20+CLOSE,55);
X2:=EMA(CLOSE,3);
X3:=(2*CLOSE+LOW+HIGH)/4;
X4:=X1-X2;
海平面: EMA(X3,55)*0.84,LINETHICK2,COLORBLUE;
陆地: EMA(X3,55)*1.04,LINETHICK2,COLORYELLOW;
天空:EMA(X3,55)*1.18,LINETHICK2,COLORRED;
半:=MA5>REF(MA5,1)AND MA5<=陆地 AND REF(MA5,1)
全:=XL6 AND C<=海平面;
DRAWTEXT(XL6 AND C>陆地 AND L2,LOW*0.99,'少量买 '),COLORFFFFFF;
DRAWTEXT(XL6 AND C>陆地 AND L3,LOW*0.99,'少量买 '),COLORFFFFFF;
DRAWTEXT(半,LOW*1.02,'←半仓买'),COLORRED;
DRAWTEXT(全 AND L2,LOW*1.02,'←全仓买 '),COLOR33CC99;
VAR6:=REF(CLOSE,1);
VAR7:=SMA(MAX(CLOSE-VAR6,0),6,1)/SMA(Abs(CLOSE-VAR6),6,1)*100;
DRAWTEXT(CROSS(84,VAR7),H*1.03,'★逃顶★'),COLORFFCC99;