-
Notifications
You must be signed in to change notification settings - Fork 627
Open
Description
Sometimes, the bot fails to close a position when both grid close and trailing close are configured sequentially.
close_trailing_grid_ratio > 0
The issue occurs during live trading, but not in backtests.
Expected Behavior:
- Grid-based closing.
- If conditions are met, engage trailing close.
Actual Behavior:
- Grid-based closing.
- No trailing close orders. The position remains open ("stuck") even after trailing close conditions are met.
This does not happen in backtests.
Likely cause: during the wait for trailing conditions, the wallet balance slightly increases (due to opposite direction position making profit), which might affect the calculated close size or minimum order constraints.
As soon as the "stuck" position is reduced manually by the minimum amount allowed by the trading platform, the trailing close order is immediately executed.
Environment:
Exchange: Bybit
Mode: Live
Bot config: close_trailing_grid_ratio > 0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels