gitee.com/quant1x/engine@v1.8.4/factors/feature_ism.tdx (about)

     1  {
     2  策略: 情绪大师
     3  编码: S8
     4  版本: V1.1.0
     5  日期: 2023-12-30
     6  
     7  变量前缀说明:
     8  P-周期
     9  O-观察对象
    10  C-条件
    11  X-临时变量
    12  D-差值
    13  }
    14  PN:30,COLORWHITE,NODRAW;
    15  R1CLOSE:=REF(CLOSE,1);
    16  {剔除ST}
    17  CST:=NOT(NAMELIKE('S') OR NAMELIKE('*S')) AND VOL>1;
    18  {涨跌幅}
    19  ZDF:=IFF(INBLOCK('创业板'), 0.2, IFF(INBLOCK('科创板'),0.2, IFF(INBLOCK('ST板块'), 0.05, IFF(INBLOCK('北证A股'),0.3,0.1))));
    20  {涨停价}
    21  ZTJ:=ZTPRICE(R1CLOSE,ZDF);
    22  {是否涨停}
    23  CZT:=CLOSE=ZTJ;
    24  {周期内涨停板数}
    25  BN:COUNT(CZT,PN),COLORYELLOW,NODRAW;
    26  {PN周期内首次涨停}
    27  FTZ:=BARSSINCEN(CZT,PN);
    28  {首板距离现在的天数}
    29  TN:FTZ+1,COLORWHITE,NODRAW;
    30  天:TN,COLORYELLOW,NODRAW;
    31  板:BN,COLORRED,NODRAW;
    32  CUP:=CLOSE>R1CLOSE;
    33  CPING:=CLOSE=R1CLOSE;
    34  CDOWN:=CLOSE<R1CLOSE;
    35  涨:COUNT(CUP,TN),COLORRED,NODRAW;
    36  平:COUNT(CPING,TN),COLORWHITE,NODRAW;
    37  跌:COUNT(CDOWN,TN),COLORGREEN,NODRAW;
    38  {首板以来的最高价}
    39  OH:HHV(HIGH,TN),COLORRED,DOTLINE;
    40  {首板以来最高价到现在的周期}
    41  OHN:BARSLAST(HIGH=OH),COLORYELLOW,NODRAW;
    42  {首板以来的最低价}
    43  OL:LLV(LOW,TN),COLORGREEN,DOTLINE;
    44  {首板以来最低价到现在的周期}
    45  OLN:BARSLAST(LOW=OL),COLORYELLOW,NODRAW;
    46  {首板以来最高价当日的成交量}
    47  OHV:REF(VOL,OHN),COLORWHITE,NODRAW;
    48  {今天成交量和最高价当日成交量的比值}
    49  OHBL:VOL/OHV,COLORWHITE,NODRAW;
    50  {首板以来最低价当日的成交量}
    51  OLV:REF(VOL,OLN),COLORWHITE,NODRAW;
    52  {今天成交量和最低价当日成交量的比值}
    53  OLBL:VOL/OLV,COLORWHITE,NODRAW;