public void Print(string msg,PrintType p = PrintType.Info)
定义
描述
打印日志
参数
参数名 | 类型 | 描述 |
---|---|---|
msg | string | 需要打印的日志 |
PrintType | PrintType | 打印类型:默认PrintType.Info,异常为PrintType.Error |
返回值
返回值 | 类型 | 描述 |
---|---|---|
无返回值 |
示例
public override void OnData(Slice slice)
{
//按照251天内盈亏比升序排序,取前10条
List<string> codes= ProfitRatioSort(true, 10, 251).ToList();
//打印排序后的股票代码
Print($"{codes.ToJson()}");
///打印异常
Print($"{codes.ToJson()}",PrintType.Error);
}