2 Star 11 Fork 13

王布衣/engine

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
dateset_trans.go 1.72 KB
Copy Edit Raw Blame History
王布衣 authored 2 years ago . 统一数据到factors目录
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.UpdateTickStartDate(date)
base.GetTickAll(r.GetSecurityCode())
}
func (r *TransactionRecord) Repair(date string) {
//base.GetTickAll(r.code)
base.GetTickData(r.GetSecurityCode(), date)
}
func (r *TransactionRecord) Increase(snapshot quotes.Snapshot) {
//TODO implement me
panic("implement me")
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/quant1x/engine.git
git@gitee.com:quant1x/engine.git
quant1x
engine
engine
v0.9.0

Search