2 Star 7 Fork 11

王布衣/engine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
dataset_trans.go 1.76 KB
一键复制 编辑 原始数据 按行查看 历史
package factors
import (
"context"
"gitee.com/quant1x/engine/cache"
"gitee.com/quant1x/engine/datasource/base"
"gitee.com/quant1x/gotdx/quotes"
)
// TransactionRecord 成交记录
//
// 最短3秒内的合并统计数据, 与行情数据保持一致
// 不可以当作tick数据来使用
type TransactionRecord struct {
cache.DataSummary
Date string
Code string
}
func init() {
summary := __mapDataSets[BaseTransaction]
_ = cache.Register(&TransactionRecord{DataSummary: summary})
}
func (r *TransactionRecord) Clone(date string, code string) DataSet {
summary := __mapDataSets[BaseTransaction]
var dest = TransactionRecord{DataSummary: summary, Date: date, Code: code}
return &dest
}
func (r *TransactionRecord) GetDate() string {
return r.Date
}
func (r *TransactionRecord) GetSecurityCode() string {
return r.Code
}
func (r *TransactionRecord) Print(code string, date ...string) {
//TODO implement me
panic("implement me")
}
func (r *TransactionRecord) Init(ctx context.Context, date string) error {
_ = ctx
_ = date
return nil
}
func (r *TransactionRecord) Checkout(securityCode, date string) {
//TODO implement me
panic("implement me")
}
func (r *TransactionRecord) Check(cacheDate, featureDate string) error {
//TODO implement me
panic("implement me")
}
func (r *TransactionRecord) Filename(date, code string) string {
//TODO implement me
panic("implement me")
}
func (r *TransactionRecord) Update(date string) {
base.UpdateBeginDateOfHistoricalTradingData(date)
base.GetAllHistoricalTradingData(r.GetSecurityCode())
}
func (r *TransactionRecord) Repair(date string) {
//base.GetAllHistoricalTradingData(r.code)
base.GetHistoricalTradingDataByDate(r.GetSecurityCode(), date)
}
func (r *TransactionRecord) Increase(snapshot quotes.Snapshot) {
_ = snapshot
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/quant1x/engine.git
git@gitee.com:quant1x/engine.git
quant1x
engine
engine
v1.8.16

搜索帮助