aaa:=CLOSE*1.1<REFX(&CLOSE,5);
b1=REF(aaa,1)=0 AND aaa=1 ;
b2= REFX(&CLOSE,1)>CLOSE;
b3=b2 AND HHV(b1,4)=1;
b4=FILTER(b3,5);
s=REF(aaa,4)=1 AND REF(aaa,3)=0 AND aaa=0;
STICKLINE((b4 AND BARSLAST(b4,1)>BARSLAST(s,0) AND s=0), 0,1,8,1),colorred;
STICKLINE((s AND BARSLAST(b4,0)<BARSLAST(s,1)), 0,-1,8,0),colorgreen;
DRAWICON((b4 AND BARSLAST(b4,1)>BARSLAST(s,0) AND s=0),-0.1,1);
DRAWICON((s AND BARSLAST(b4,0)<BARSLAST(s,1)),0.1,2);
DRAWTEXT((b4 AND BARSLAST(b4,1)>BARSLAST(s,0) AND s=0),0,"★买入"),colorred;
DRAWTEXT((s AND BARSLAST(b4,0)<BARSLAST(s,1)),0, "☆卖出"),colorgreen;
//IF (b4 AND BARSLAST(b4,1)>BARSLAST(s,0) AND s=0)
//BUY;
//IF (s AND BARSLAST(b4,0)<BARSLAST(s,1))
//SELL;