grid2: add closing grid log

This commit is contained in:
c9s 2023-02-06 16:31:57 +08:00
parent 29d6083737
commit 3a7be0e2b2
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -737,11 +737,12 @@ func (s *Strategy) OpenGrid(ctx context.Context) error {
// CloseGrid closes the grid orders
func (s *Strategy) CloseGrid(ctx context.Context) error {
s.logger.Infof("closing %s grid", s.Symbol)
bbgo.Sync(ctx, s)
// now we can cancel the open orders
s.logger.Infof("canceling grid orders...")
if err := s.orderExecutor.GracefulCancel(ctx); err != nil {
return err
}