时间:=TIME2=100100;
N:=BARSLAST(时间);
C1:CONST(IF(N,MAX(REF(HHV(H,0),N),DYNAINFO(4)),HHV(H,0))),DOTLINE,COLORRED;
C2:CONST(IF(N,MIN(REF(LLV(L,0),N),DYNAINFO(4)),LLV(L,0))),DOTLINE,COLORGREEN;
C3:(C1+C2)/2,DOTLINE,COLORYELLOW;
VV:=HHV(V,0);
DRAWNUMBER(CURRBARSCOUNT=2,C1*1.005,VAR2STR(C1,3)),COLORYELLOW;
DRAWNUMBER(CURRBARSCOUNT=2,C2*0.995,VAR2STR(C2,3)),COLORYELLOW;
DRAWTEXT(C1/C2 =1.03 AND CROSS(C,C1) AND V =VV,C1*1.005,'★买入')COLORRED;
DRAWTEXT(C1/C2 =1.03 AND CROSS(C2,C) AND V =VV,C2*0.995,'★卖出')COLORGREEN;
STICKLINE(C1/C2 1.03 AND CROSS(C,C1) AND V =VV,DYNAINFO(3)*1.1,DYNAINFO(3)*0.9,1,0),COLORRED;