mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
fix kline query endtime
This commit is contained in:
parent
4c2897a86d
commit
47e4847034
|
@ -408,8 +408,7 @@ func (session *ExchangeSession) initSymbol(ctx context.Context, environ *Environ
|
|||
|
||||
for interval := range klineSubscriptions {
|
||||
// avoid querying the last unclosed kline
|
||||
// endTime := environ.startTime.Add(-interval.Duration())
|
||||
endTime := environ.startTime.Add(-time.Millisecond)
|
||||
endTime := environ.startTime.Add(-interval.Duration())
|
||||
kLines, err := session.Exchange.QueryKLines(ctx, symbol, interval, types.KLineQueryOptions{
|
||||
EndTime: &endTime,
|
||||
Limit: 1000, // indicators need at least 100
|
||||
|
|
Loading…
Reference in New Issue
Block a user