From 3a7be0e2b2baeb9ca0cb83996d1c9cbed46b64c1 Mon Sep 17 00:00:00 2001 From: c9s Date: Mon, 6 Feb 2023 16:31:57 +0800 Subject: [PATCH] grid2: add closing grid log --- pkg/strategy/grid2/strategy.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/strategy/grid2/strategy.go b/pkg/strategy/grid2/strategy.go index 6746fca0f..31aa942a5 100644 --- a/pkg/strategy/grid2/strategy.go +++ b/pkg/strategy/grid2/strategy.go @@ -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 }