mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
xalign: add more checks
This commit is contained in:
parent
0482ade44a
commit
a28081a5d2
|
@ -236,9 +236,9 @@ func (s *Strategy) CrossRun(ctx context.Context, _ bbgo.OrderExecutionRouter, se
|
||||||
|
|
||||||
orderBook := bbgo.NewActiveOrderBook("")
|
orderBook := bbgo.NewActiveOrderBook("")
|
||||||
orderBook.BindStream(session.UserDataStream)
|
orderBook.BindStream(session.UserDataStream)
|
||||||
|
s.orderBooks[sessionName] = orderBook
|
||||||
|
|
||||||
s.sessions[sessionName] = session
|
s.sessions[sessionName] = session
|
||||||
s.orderBooks[sessionName] = orderBook
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bbgo.OnShutdown(ctx, func(ctx context.Context, wg *sync.WaitGroup) {
|
bbgo.OnShutdown(ctx, func(ctx context.Context, wg *sync.WaitGroup) {
|
||||||
|
@ -313,6 +313,7 @@ func (s *Strategy) align(ctx context.Context, sessions map[string]*bbgo.Exchange
|
||||||
} else {
|
} else {
|
||||||
log.Errorf("orderbook %s not found", selectedSession.Name)
|
log.Errorf("orderbook %s not found", selectedSession.Name)
|
||||||
}
|
}
|
||||||
|
s.orderBooks[selectedSession.Name].Add(*createdOrder)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user