天软金融分析.NET函数大全 > 金融函数 > 板块 > 行情指标 > 区间行情

StocksUpDownMorethanCount    

简述
统计股票列表StockArr在区间begt到endt之间满足IsDown上涨或下跌基准value的家数。
定义
StocksUpDownMorethanCount(StockArr:Array;BegT:TDateTime;EndT:TDateTime;Value:Int;IsDown:Int):Int
参数
名称类型说明
StockArrArray一维股票列表
BegTTDateTime开始日期
EndTTDateTime截止日期
ValueInt股票上涨/下跌基准(涨幅)
IsDownInt上涨/下跌,具体取值如下:
涨跌 取值
下跌 0
上涨 1
返回Int整数
  • 范例

    范例1:

    //返回沪深300区间涨幅大于等于10的家数
      stks:= getbkbydate('SH000300',inttodate(20101231));
      BegT:= inttodate(20110101);
      EndT:= inttodate(20110630);
      return StocksUpDownMorethanCount(stks,BegT,EndT,10,1);
      //返回结果:50

    范例2:

    //返回沪深300区间涨幅小于等于10的家数
      stks:= getbkbydate('SH000300',inttodate(20101231));
      BegT:= inttodate(20110101);
      EndT:= inttodate(20110630);
      return StocksUpDownMorethanCount(stks,BegT,EndT,10,0);
      //返回结果:248
    参考
    Bk_PercentMorethanValue 
相关