天数:=30;
XA_1:=FINANCE(1)/100000000;
XA_2:=AMOUNT/vol/100;
XA_3:=XA_1*XA_2;
XA_4:=FINVALUE(276)/100000000;
XA_5:=XA_3/XA_4;
滚动市盈率:IF(XA_5/REF(XA_5,1)<0.88,REF(XA_5,1),XA_5),COLORLIMAGENTA,LINETHICK2;
高估区:HHV(滚动市盈率,天数);
低估区:LLV(滚动市盈率,天数);
安全边际:(高估区-低估区)/2+低估区;
NOTEXT1:IF(滚动市盈率<安全边际,滚动市盈率,DRAWNULL),COLORCYAN,LINETHICK2;
股息率:FINANCE(45),NODRAW;
XA_6:=FINVALUE(0);
XA_7:=XA_6;
XA_8:=INTPART(XA_7/10000);
XA_9:=XA_7-XA_8*10000;
XA_10:=IF(XA_9=1231,XA_8,XA_8-1);
XA_11:=FINONE(197,XA_10,1231);
XA_12:=FINONE(197,XA_10-1,1231);
XA_13:=FINONE(197,XA_10-2,1231);
XA_14:=FINONE(202,XA_10,1231);
XA_15:=FINONE(202,XA_10-1,1231);
XA_16:=FINONE(202,XA_10-2,1231);
XA_17:=FINONE(199,XA_10,1231);
XA_18:=FINONE(199,XA_10-1,1231);
XA_19:=FINONE(199,XA_10-2,1231);
近3年ROE:(XA_11+XA_12+XA_13)/3,NODRAW;
近3年毛利率:(XA_14+XA_15+XA_16)/3,NODRAW;
近3年净利率:(XA_17+XA_18+XA_19)/3,NODRAW;