From f8175a9cfefe263a9112b3980361422ed451b975 Mon Sep 17 00:00:00 2001 From: Michal Jirman Date: Fri, 2 Feb 2024 21:44:27 +0545 Subject: [PATCH] telegram: prevent sending error in case of no opened position --- pkg/bbgo/interact.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/bbgo/interact.go b/pkg/bbgo/interact.go index d39cff261..133c1b13f 100644 --- a/pkg/bbgo/interact.go +++ b/pkg/bbgo/interact.go @@ -147,7 +147,7 @@ func (it *CoreInteraction) Commands(i *interact.Interact) { position := reader.CurrentPosition() if position == nil || position.Base.IsZero() { reply.Message(fmt.Sprintf("Strategy %q has no opened position", signature)) - return fmt.Errorf("strategy %T has no opened position", strategy) + return nil } reply.Send("Your current position:")