HH:=L>REF(L,1) AND H>REF(H,1);
LL:=H<REF(H,1) AND L<REF(L,1);
ZZ:=NOT(HH) AND NOT(LL);
C1:=IF(HH,C,REF(C,BARSLAST(HH)));
C2:=IF(LL,O,REF(O,BARSLAST(LL)));
C3:=IF(ZZ,C,REF(C,BARSLAST(ZZ)));
MC1:MA(C1,5),COLORYELLOW;
MC2:MA(C2,5),COLORBLUE;
MC3:MA(C3,5),COLORWHITE;
STICKLINE(HH,C,O,1.1,0),COLORYELLOW;
STICKLINE(HH,H,L,0,0),COLORYELLOW;
STICKLINE(LL,C,O,1.1,0),COLORBLUE;
STICKLINE(LL,H,L,0,0),COLORBLUE;
STICKLINE(ZZ,C,O,1.1,0),COLORWHITE;
STICKLINE(ZZ,H,L,0,0),COLORWHITE;
TJ:=O<=MIN(MC3,MC1) AND C>=MAX(MC1,MC3) AND HH AND REF(NOT(HH),1) AND MAX(MC1,MC3)/MIN(MC1,MC3)<1.01;
DRAWTEXT(TJ,L*0.94,'买'),COLORYELLOW;