mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
grid2: add closing grid log
This commit is contained in:
parent
29d6083737
commit
3a7be0e2b2
|
@ -737,11 +737,12 @@ func (s *Strategy) OpenGrid(ctx context.Context) error {
|
||||||
|
|
||||||
// CloseGrid closes the grid orders
|
// CloseGrid closes the grid orders
|
||||||
func (s *Strategy) CloseGrid(ctx context.Context) error {
|
func (s *Strategy) CloseGrid(ctx context.Context) error {
|
||||||
|
s.logger.Infof("closing %s grid", s.Symbol)
|
||||||
|
|
||||||
bbgo.Sync(ctx, s)
|
bbgo.Sync(ctx, s)
|
||||||
|
|
||||||
// now we can cancel the open orders
|
// now we can cancel the open orders
|
||||||
s.logger.Infof("canceling grid orders...")
|
s.logger.Infof("canceling grid orders...")
|
||||||
|
|
||||||
if err := s.orderExecutor.GracefulCancel(ctx); err != nil {
|
if err := s.orderExecutor.GracefulCancel(ctx); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user