GetHighLowPriceByClose(数据库)

定义

Task<List<(string Code, Decimal High, Decimal Low)>> GetHighLowPriceByClose(int daysCount, DateTime date, List<string> Codes);

描述

获取区间最高最低价格(按收盘价计算)【不含当天】

参数

参数名 类型 描述
daysCount int 天数
date DateTime 时间
Codes List<string> 股票代码

返回值

返回值 类型 描述
result List<(string Code, Decimal High, Decimal Low)> 数据实体

示例

public override void OnData(Slice slice)
{
         //获取股票60天的最高价和最低价
         var result = GetHighLowPriceByClose(60, Time, ["000001.XSHE"]);
         foreach(var res in result){
                  Print($"股票:{res.Code},最高价:{res.High},最低价:{res.Low}");
         }
}