Skip to content

Commit

Permalink
telegram: prevent sending error in case of no opened position
Browse files Browse the repository at this point in the history
  • Loading branch information
michaljirman committed Feb 2, 2024
1 parent b5cd5aa commit f8175a9
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 f8175a9

Please sign in to comment.