Compare commits

..

2 Commits

Author SHA1 Message Date
injoyai
5fa572f298 把集合竞价合并到931里面 2025-10-28 08:41:04 +08:00
injoyai
61b2e737b3 把集合竞价从931剥离出来到930 2025-10-27 09:09:19 +08:00
2 changed files with 3 additions and 3 deletions

View File

@@ -293,6 +293,7 @@ func (this Klines) Merge(n int) Klines {
if n <= 1 {
return this
}
ks := Klines(nil)
ls := Klines(nil)
for i := 0; ; i++ {

View File

@@ -183,7 +183,6 @@ func (this Trades) Kline(t time.Time, last Price) *Kline {
// kline1 生成一分钟k线,一天
func (this Trades) klinesForDay(date time.Time) Klines {
_929 := 569 //9:29 的分钟,为了兼容性强,把9:25算9:29
_930 := 570 //9:30 的分钟
_1130 := 690 //11:30 的分钟
_1300 := 780 //13:00 的分钟
@@ -191,7 +190,7 @@ func (this Trades) klinesForDay(date time.Time) Klines {
keys := []int(nil)
//早上
m := map[int]Trades{}
for i := 0; i <= 120; i++ {
for i := 1; i <= 120; i++ {
keys = append(keys, _930+i)
m[_930+i] = []*Trade{}
}
@@ -211,7 +210,7 @@ func (this Trades) klinesForDay(date time.Time) Klines {
//分组,按
for _, v := range this {
ms := minutes(v.Time)
t := conv.Select(ms < _929, _929, ms)
t := conv.Select(ms < _930, _930, ms)
t++
t = conv.Select(t > _1130 && t <= _1300, _1130, t)
t = conv.Select(t > _1500, _1500, t)