bbgo: notify closing position

This commit is contained in:
c9s 2022-09-11 02:33:32 +08:00
parent 6c22c3799e
commit 5c18bc4d41
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -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
}