mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
telegram: prevent sending error in case of no opened position
This commit is contained in:
parent
b5cd5aa5ef
commit
f8175a9cfe
|
@ -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:")
|
||||
|
|
Loading…
Reference in New Issue
Block a user