mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
fix: comment format, dbg logs in session
This commit is contained in:
parent
d247e1cb97
commit
3d672ea518
|
@ -422,7 +422,6 @@ func (session *ExchangeSession) initSymbol(ctx context.Context, environ *Environ
|
|||
|
||||
// always subscribe the 1m kline so we can make sure the connection persists.
|
||||
klineSubscriptions[minInterval] = struct{}{}
|
||||
log.Warnf("sub: %v", klineSubscriptions)
|
||||
|
||||
for interval := range klineSubscriptions {
|
||||
// avoid querying the last unclosed kline
|
||||
|
@ -451,8 +450,6 @@ func (session *ExchangeSession) initSymbol(ctx context.Context, environ *Environ
|
|||
session.lastPrices[symbol] = lastKLine.Close
|
||||
}
|
||||
|
||||
log.Warnf("load %s", interval)
|
||||
|
||||
for _, k := range kLines {
|
||||
// let market data store trigger the update, so that the indicator could be updated too.
|
||||
marketDataStore.AddKLine(k)
|
||||
|
|
|
@ -25,7 +25,8 @@ func (i Interval) Seconds() int {
|
|||
return m
|
||||
}
|
||||
|
||||
// specially handled, for better precision
|
||||
// Milliseconds is specially handled, for better precision
|
||||
// for ms level interval, calling Seconds and Minutes directly might trigger panic error
|
||||
func (i Interval) Milliseconds() int {
|
||||
t := 0
|
||||
index := 0
|
||||
|
|
Loading…
Reference in New Issue
Block a user