NA:=BArslAST(YEAR!=REF(YEAR,1));
NQT:=BacKSET(NA=0,2);
NT:=BARSLAST(crOSS(NQT=1,0.5));
NC:=REF(REF(C,NT),1);
年涨幅:(C-NC)/NC*100 NODRAW;
年涨天:SUM(年涨幅>0,NA+1)NODRAW;
年跌天:SUM(年涨幅<0,NA+1)NODRAW;
年平天:SUM(年涨幅=0,NA+1)NODRAW;
平盘距今:BARSLAST(年涨幅=0)NODRAW;
今年交易日:CONST(NA)+1 NODRAW;
平盘日期:REF(DATE,平盘距今)-1000000 NODRAW;
STICKLINE(平盘距今=0,C,O,2,0),COLORYELLOW;
DRAWLINE(CURRBARSCOUNT=CONST(平盘距今)+1,H,ISLASTBAR,REF(H,平盘距今),0),COLORYELLOW;
{
选股公式:
NA:=BARSLAST(YEAR!=REF(YEAR,1));
NQT:=BACKSET(NA=0,2);
NT:=BARSLAST(CROSS(NQT=1,0.5));
NC:=REF(REF(C,NT),1);
年涨幅:=(C-NC)/NC*100 ;
PT:=BARSLAST(年涨幅=0);
CROSS(C,REF(H,PT));
}