N1:=20;
N2:=30;
TJ1:=C>O;
ZG:=CONST(REF(HHVBARS(H,N2-N1+1),N1))+N1+1;
{N3:=CONST(BARSLAST(TJ1))+1; {只剩一个的那个条件变量,其余的已都滤掉}}
{DRAWTEXT(REFX(TJ1,ZG-N3),H*1.005,'目前是阳线'),COLORRED;}
DRAWTEXT(CURRBARSCOUNT=ZG&&CONST(TJ1),H*1.05,'目前是阳线'),COLORRED; {在K线上方};
(来源:文华财经)