天软金融分析.NET函数大全 > 数据仓库函数 > 向导函数

StockTrailingAvgByEndT    

简述
获取基于指定日推移阶段的日均指标
定义
StockTrailingAvgByEndT(Endt:Date;RefType:UserDefine;Exp:String;IsExcludeIPO:Boolean;N:Integer):Real
参数
名称类型说明
EndtDate日期,截止日
RefTypeUserDefine用户自定义,选择所推移类型,取值如下:
显示名 取值
最近1周 0
最近1月 1
最近3月 2
最近6月 3
最近1年 4
最近2年 5
最近3年 6
最近5年 7
本周以来 8
本月以来 9
本季以来 10
本年以来 11
成立以来 12
ExpString字符串, 指标表达式,如"close()","stockzdf3()"
IsExcludeIPOBoolean真假, 是否剔除上市日区间行情
NInteger整数, 剔除天数
返回RealReal, 获取基于指定日推移阶段的日均指标
  • 范例

    范例01
    获取万科A过去1年的日均成交金额
      setsysparam(pn_stock(),"SZ000002");
      endt := 20210714t;
      RefType := 4;//过去1年
      exp := "Amount()";
    return StockTrailingAvgByEndT(Endt,RefType,Exp);
    // 2172484158.52

    范例02
    获取厦门银行过去1年的日均成交金额(剔除上市日3天)
      setsysparam(pn_stock(),"SH601187");
      endt := 20210714t;
      RefType := 4;//过去1年
      exp := "Amount()";
      IsExcludeIPO := 1;//考虑剔除上市日影响
      N := 3;//上市行情3天
    return StockTrailingAvgByEndT(Endt,RefType,Exp,IsExcludeIPO,N);
    // 444243617.69
相关