Skip to content

[grid2] bbgo got stuck after triggering stop loss  #1764

@kkc

Description

@kkc

I'm not sure if this is the expected behavior. After grid2's stop loss was triggered, BBGO got stuck instead of shutting down.

[782279] ERROR Recover: failed to recover empty grid error=the order's (30952137802) price (0) is not in pins   
[Recover] failed to add queried order into twin orderbook: ORDER binance | 30952137802 | BTCUSDT | MARKET SELL | 0.01559/0.01559 @ 0 | FILLED | Oct  2 19:47:02.973 -> Oct  2 19:47:02.973
github.com/c9s/bbgo/pkg/strategy/grid2.queryTradesToUpdateTwinOrderBook
        /root/bbgo/pkg/strategy/grid2/recover.go:437
github.com/c9s/bbgo/pkg/strategy/grid2.(*Strategy).recoverEmptyGridOnTwinOrderBook
        /root/bbgo/pkg/strategy/grid2/recover.go:306
github.com/c9s/bbgo/pkg/strategy/grid2.(*Strategy).recover
        /root/bbgo/pkg/strategy/grid2/recover.go:238
github.com/c9s/bbgo/pkg/strategy/grid2.(*Strategy).recoverPeriodically
        /root/bbgo/pkg/strategy/grid2/recover.go:70
github.com/c9s/bbgo/pkg/strategy/grid2.(*Strategy).Run.func7.1
        /root/bbgo/pkg/strategy/grid2/strategy.go:1996
runtime.goexit
        /snap/go/10698/src/runtime/asm_amd64.s:1700
[Recover] failed to query trades to update twin orderbook
github.com/c9s/bbgo/pkg/strategy/grid2.(*Strategy).recoverEmptyGridOnTwinOrderBook
        /root/bbgo/pkg/strategy/grid2/recover.go:307
github.com/c9s/bbgo/pkg/strategy/grid2.(*Strategy).recover
        /root/bbgo/pkg/strategy/grid2/recover.go:238
github.com/c9s/bbgo/pkg/strategy/grid2.(*Strategy).recoverPeriodically
        /root/bbgo/pkg/strategy/grid2/recover.go:70
github.com/c9s/bbgo/pkg/strategy/grid2.(*Strategy).Run.func7.1
        /root/bbgo/pkg/strategy/grid2/strategy.go:1996
runtime.goexit
        /snap/go/10698/src/runtime/asm_amd64.s:1700 strategy=grid2 symbol=BTCUSDT

my telegram bot log

Closing BTCUSDT position 100% with tags: grid2:stopLoss
Trade binance BTCUSDT SELL 0.01559 @ 60107.33, amount 937.0732747, fee 0.00130803 BNB

[error] [Recover] failed to recover empty grid Error: [Recover] failed to query trades to update twin orderbook: [Recover] failed to add queried order into twin orderbook: ORDER binance | 30952137802 | BTCUSDT | MARKET SELL | 0.01559/0.01559 @ 0 | FILLED | Oct  2 19:47:02.973 -> Oct  2 19:47:02.973: the order's (30952137802) price (0) is not in pins

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions