Skip to content

Commit

Permalink
Merge pull request c9s#1521 from michaljirman/bugfix-telegram-no-open…
Browse files Browse the repository at this point in the history
…ed-positions-error

FIX: [telegram] prevent sending error to telegram for the case of no opened position
  • Loading branch information
c9s committed Feb 2, 2024
2 parents b5cd5aa + f8175a9 commit 80ed46e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/bbgo/interact.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:")
Expand Down

0 comments on commit 80ed46e

Please sign in to comment.