NX:=5;
NN:=BARSLAST(DATE<>REF(DATE,1))+1;
CCC1:=IF(NN=1,REF(SETTLE,1),0);
T:=SUM(CCC1,SUMBARS(NN=1,NX-1))+SETTLE;
DRAWCOLORLINE(C>T/NX,T/NX,COLORWHITE,COLORWHITE);
DRAWCOLORLINE(T/NX>REF(T/NX,1),T/NX,COLORWHITE,COLORYELLOW);
T/NX,NODRAW;
NX8:=8;
NN8:=BARSLAST(DATE<>REF(DATE,1))+1;
CCC8:=IF(NN8=1,REF(SETTLE,1),0);
T8:=SUM(CCC8,SUMBARS(NN8=1,NX8-1))+SETTLE;
DRAWCOLORLINE(C>T/NX8,T8/NX8,COLORGRAY,COLORGRAY);
当画出来的线大于前一天时为红色,小于前一天时为蓝色
(来源:文华财经)