Skip to content

Commit 80ed46e

Browse files
authored
Merge pull request #1521 from michaljirman/bugfix-telegram-no-opened-positions-error
FIX: [telegram] prevent sending error to telegram for the case of no opened position
2 parents b5cd5aa + f8175a9 commit 80ed46e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/bbgo/interact.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ func (it *CoreInteraction) Commands(i *interact.Interact) {
147147
position := reader.CurrentPosition()
148148
if position == nil || position.Base.IsZero() {
149149
reply.Message(fmt.Sprintf("Strategy %q has no opened position", signature))
150-
return fmt.Errorf("strategy %T has no opened position", strategy)
150+
return nil
151151
}
152152

153153
reply.Send("Your current position:")

0 commit comments

Comments
 (0)