Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kkc opened this issue Oct 3, 2024 · 0 comments
Open

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

kkc opened this issue Oct 3, 2024 · 0 comments

Comments

@kkc
Copy link
Contributor

kkc commented Oct 3, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant