mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
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
This commit is contained in:
commit
80ed46e23a
|
@ -147,7 +147,7 @@ func (it *CoreInteraction) Commands(i *interact.Interact) {
|
||||||
position := reader.CurrentPosition()
|
position := reader.CurrentPosition()
|
||||||
if position == nil || position.Base.IsZero() {
|
if position == nil || position.Base.IsZero() {
|
||||||
reply.Message(fmt.Sprintf("Strategy %q has no opened position", signature))
|
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:")
|
reply.Send("Your current position:")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user