mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
service/backtest: use second instead of milliseconds for filtering
This commit is contained in:
parent
5e1e0c7661
commit
49728622bc
|
@ -46,7 +46,7 @@ func (s *BacktestService) SyncKLineByInterval(ctx context.Context, exchange type
|
|||
},
|
||||
Filter: func(obj interface{}) bool {
|
||||
k := obj.(types.KLine)
|
||||
return !k.EndTime.Before(k.StartTime.Time().Add(k.Interval.Duration() - time.Millisecond))
|
||||
return !k.EndTime.Before(k.StartTime.Time().Add(k.Interval.Duration() - time.Second))
|
||||
},
|
||||
ID: func(obj interface{}) string {
|
||||
kline := obj.(types.KLine)
|
||||
|
|
Loading…
Reference in New Issue
Block a user