public override IEnumerable<string> ProfitRatioSort(bool isAscSort, int take, int day)
ProfitRatioSort(数据库)
定义
描述
股票盈亏比排序
*调用此方法 必须先调用 InitChooseStock选股方法
*调用此方法 必须先调用 InitChooseStock选股方法
参数
参数名 | 类型 | 描述 |
---|---|---|
isAscSort | bool | 是否升序排序 |
take | int | 需要排序后的多少条数据 |
day | int | 使用多少天之前的数据进行盈亏比排序 |
返回值
返回值 | 类型 | 描述 |
---|---|---|
result | IEnumerable<string> | 排序后的股票代码集合 |
示例
public override void OnData(Slice slice)
{
//按照251天内盈亏比升序排序,取前10条
List<string> codes= ProfitRatioSort(true, 10, 251).ToList();
}