From 5c18bc4d410ad5e95e869222e173219c1c8d2fa2 Mon Sep 17 00:00:00 2001 From: c9s Date: Sun, 11 Sep 2022 02:33:32 +0800 Subject: [PATCH] bbgo: notify closing position --- pkg/bbgo/order_executor_general.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/bbgo/order_executor_general.go b/pkg/bbgo/order_executor_general.go index 2b38d35e8..bb8f4161b 100644 --- a/pkg/bbgo/order_executor_general.go +++ b/pkg/bbgo/order_executor_general.go @@ -257,8 +257,11 @@ func (e *GeneralOrderExecutor) ClosePosition(ctx context.Context, percentage fix return nil } - log.Infof("closing %s position with tags: %v", e.symbol, tags) - submitOrder.Tag = strings.Join(tags, ",") + tagStr := strings.Join(tags, ",") + submitOrder.Tag = tagStr + + Notify("closing %s position %s with tags: %v", e.symbol, percentage.Percentage(), tagStr) + _, err := e.SubmitOrders(ctx, *submitOrder) return err }