通达信差别市盈率副图指标 做投资时参考 源码附图
EP1:FINONE(1,23,1231),NODRAW;{每年4月30日更新}
CYB:=IF(CODELIKE('300'),1,0);
CYBB:=IF(CODELIKE('301'),1,0);
KCB:=IF(CODELIKE('688'),1,0);
KCBB:=IF(CODELIKE('689'),1,0);
ZXB:=IF(CODELIKE('002'),1,0);
ZXBB:=IF(CODELIKE('003'),1,0);
ST:=IF(CODELIKE('ST'),1,0);
BJB:=IF(CODELIKE('87'),1,0);
BB:=IF(CODELIKE('83'),1,0);
BJ:=IF(CODELIKE('43'),1,0);
创业板:=CYB OR CYBB;
科创板:=KCB OR KCBB;
中小板:=ZXB OR ZXBB;
北交所:=BJB OR BB OR BJ;
主板:=NOT(创业板) AND NOT(科创板) AND NOT(中小板) AND NOT(北交所);
PE:C/EP1,NODRAW;
低估:(主板 AND PE<20 AND PE>0)
OR (中小板 AND PE<25 AND PE>0)
OR (创业板 AND PE<30 AND PE>0 )
OR (科创板 AND PE<35 AND PE>0),LINETHICK0;
高估:( 主板 AND PE>=45 )
OR (中小板 AND PE>=55 )
OR (创业板 AND PE>=65 )
OR (科创板 AND PE>=75 ),LINETHICK0;
STICKLINE(高估,0,PE,8,0),COLORRED;
STICKLINE(低估,0,PE,8,0),COLORYELLOW;
STICKLINE(NOT(低估) AND NOT(高估),0,PE,8,0),COLORLIBLUE ;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
输出EP1:FINONE(1,23,1231),NODRAW
{每年4月30日更新}
CYB赋值:IF(CODELIKE('300'),1,0)
CYBB赋值:IF(CODELIKE('301'),1,0)
KCB赋值:IF(CODELIKE('688'),1,0)
KCBB:=IF(CODELIKE('689'),1,0)
ZXB赋值:IF(CODELIKE('002'),1,0)
ZXBB:=IF(CODELIKE('003'),1,0)
ST赋值:IF(CODELIKE('ST'),1,0)
BJB赋值:IF(CODELIKE('87'),1,0)
BB赋值:IF(CODELIKE('83'),1,0)
BJ赋值:IF(CODELIKE('43'),1,0)
创业板赋值:CYB OR CYBB
科创板赋值:KCB OR KCBB
中小板赋值:ZXB OR ZXBB
北交所赋值:BJB OR BB OR BJ
主板赋值:NOT(创业板) AND NOT(科创板) AND NOT(中小板) AND NOT(北交所)
输出PE:C/EP1,NODRAW
输出低估:(主板 AND PE<20 AND PE>0)
OR (中小板 AND PE<25 AND PE>0)
OR (创业板 AND PE<30 AND PE>0 )
OR (科创板 AND PE<35 AND PE>0),LINETHICK0
输出高估:( 主板 AND PE>=45 )
OR (中小板 AND PE>=55 )
OR (创业板 AND PE>=65 )
OR (科创板 AND PE>=75 ),LINETHICK0
当满足条件高估时,在0和PE之间画柱状线
当满足条件低估时,在0和PE之间画柱状线
STICKLINE(NOT(低估) AND NOT(高估),0,PE,8,0),COLORLIBLUE