void QuoteCurrentDay(Slice slice, int type, int minutes = 1, Action<ConcurrentDictionary<string, List<Quote>>> action = null)
指标对象-当天 分钟、小时
定义
描述
1、指标对象(分钟、小时),使用指标函数前,需要使用此方法获取指标对象。
2、该对象只存储当天数据,自动加载当前策略所有的订阅股票。
3、指标对象由键值对组成,key:Symbol对象,value:指标对象集合List
2、该对象只存储当天数据,自动加载当前策略所有的订阅股票。
3、指标对象由键值对组成,key:Symbol对象,value:指标对象集合List
4、使用方式详见示例
参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| slice | slice | OnData方法 参数 |
| type | Int | 类型 0-分钟 1-小时 |
| minutes | Int | 周期 |
| action | Action | 清洗后的数据,每日凌晨清空 |
返回值
| 返回值 | 类型 | 描述 |
|---|---|---|
| dic | ConcurrentDictionary<string, List<Quote>> | 清洗后的数据,是键值对 |
示例
///清洗股票数据
QuoteCurrentDay(slice, 1, 1, (dic) =>
{
if (dic.Count>0)
{
foreach (var item in dic.Keys)
{
///获取指标结果
var resp=dic[item].GetAtrStop(2);
}
}
});