2 Star 15 Fork 17

王布衣/engine

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
flash.go 756 Bytes
一键复制 编辑 原始数据 按行查看 历史
王布衣 提交于 2023-10-01 17:49 +08:00 . 增加第一个策略执行的demo
package flash
import (
"gitee.com/quant1x/engine/cachel5"
"gitee.com/quant1x/engine/features"
)
var (
// 历史数据
__l5History = cachel5.NewCache1D[*features.History](features.CacheL5KeyHistory, features.NewHistory)
)
// CacheList 缓存列表
func CacheList() []cachel5.CacheAdapter {
list := []cachel5.CacheAdapter{__l5History}
return list
}
func GetHistory() *cachel5.Cache1D[*features.History] {
return __l5History
}
func GetL5History(securityCode string, date ...string) *features.History {
data := __l5History.Get(securityCode, date...)
if data == nil {
return nil
}
return *data
}
// DataSetList 数据集 列表
func DataSetList() []features.DataSet {
list := []features.DataSet{
new(features.DataKLine),
}
return list
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/quant1x/engine.git
git@gitee.com:quant1x/engine.git
quant1x
engine
engine
v0.1.1

搜索帮助