makeSoftCandle ad timestamp

This commit is contained in:
zhangkun9038@dingtalk.com 2024-12-18 12:21:02 +08:00
parent 4796ae2bdc
commit 710dff172b
2 changed files with 5 additions and 2 deletions

4
go.sum
View File

@ -49,8 +49,8 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
github.com/phyer/core v0.1.26 h1:+/yRVBWbUSXS3RpUwztBpkM3A8U+ACtyhBACb4HVBoo=
github.com/phyer/core v0.1.26/go.mod h1:XZdniJiiZPzOU8+QHPFRQWdvJa6m5Ilj5VClWWI0OQg=
github.com/phyer/core v0.1.28 h1:cafTCG3LlLSkXb28OSnftuOfKdV5DVwrhjDZvf+vjtA=
github.com/phyer/core v0.1.28/go.mod h1:XZdniJiiZPzOU8+QHPFRQWdvJa6m5Ilj5VClWWI0OQg=
github.com/phyer/texus v0.0.0-20241207132635-0e7fb63f8196 h1:P1sxgCsS0VIL38ufZzgUuZLLyY/B+po6kSY7ziNZT7E=
github.com/phyer/texus v0.0.0-20241207132635-0e7fb63f8196/go.mod h1:iZexs5agdApNlp8HW/FqKgma4Ij1x8/o+ZLcMvY3f80=
github.com/phyer/v5sdkgo v0.1.4 h1:mAxxjPJVTYGuGDarqOcFGkzj5AgqbbzJGsnYmmsbapU=

View File

@ -404,6 +404,9 @@ func MakeSoftCandles(cr *core.Core, mcd *MyCandle) {
Candle: cd0,
}
cd1.Data = mcd.GetSetCandleInfo(cr, cs.Seg, otmi)
tmi = ToInt64(cd1.Data[0])
tm = time.UnixMilli(tmi)
cd1.Timestamp = tm
// 生成软交易量和交易数对,用于代替last生成max
go func(k int) {
time.Sleep(time.Duration(100*k) * time.Millisecond)