DRAWTEXT(VAR2 AND CLOSE MA(CLOSE,250),LOW-LOW*0.02,' 少量买 '),COLORYELLOW;
DRAWTEXT(VAR2 AND CLOSE =MA(CLOSE,60) AND CLOSE =MA(CLOSE,250),LOW-LOW*0.02,' 半仓买'),COLORYELLOW;
DRAWTEXT(VAR2 AND CLOSE MA(CLOSE,60),LOW-LOW*0.02,' 全仓买 '),COLORYELLOW;
买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,21)*20+C,42);
BU:=CROSS(买线,卖线);
SEL:=CROSS(卖线,买线);
DRAWTEXT(BU,LOW*0.98,'B'),,,COLORRED;
DRAWTEXT(SEL,HIGH*1.02,'S'),,,COLORGREEN;
TY:=C;
A1:=REF(TY,10)=HHV(TY,2*10+1); B1:=FILTER(A1,10); C1:=BACKSET(B1,10+1); HD:=FILTER(C1,10);
A2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(A2,10); C2:=BACKSET(B2,10+1); LD:=FILTER(C2,10);
A:=REF(C,BARSLAST(HD)); B:=REF(C,BARSLAST(LD));
T1:=BARSLAST(HD) BARSLAST(LD) AND NOT(HD) ;
T2:=BARSLAST(HD) BARSLAST(LD) AND NOT(LD);
波峰:IF(T1 =1,A,DRAWNULL),COLOR00FF20;
波峰射线:IF(T1 1,A,DRAWNULL),POINTDOT,COLOR00FF20;
波谷:IF(T2 =1,B,DRAWNULL),COLORFF00FF;
波谷射线:IF(T2 1,B,DRAWNULL),POINTDOT,COLORFF00FF;
YY:=(H+L+C)/3;DRAWKLINE(YY,YY,YY,YY+0.00006),COLORGREEN;