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

Strongly encourage limit orders to close #418

Open
scionaltera opened this issue Jun 3, 2021 · 2 comments
Open

Strongly encourage limit orders to close #418

scionaltera opened this issue Jun 3, 2021 · 2 comments
Labels
blocked This issue or pull request cannot proceed enhancement New feature or request help wanted Good candidate for contributions

Comments

@scionaltera
Copy link
Member

Arbitrader can get into a mode where it's waiting for one or more limit orders to fill, either to open or close a pair of positions. If you have bad luck it can be a very long time before the orders fill, if they ever do. Currently there is no way to escape from this mode unless the orders fill. It would be nice to have a graceful way to exit this situation.

I propose a new condition like force-close or exit-when-idle named adjust-limit-orders. When you create this file, Arbitrader will look at the order(s) it's waiting on. It will adjust the price on the open order(s) to match whatever the current ticker is in TickerService so that the orders will probably close. The command would be repeatable in case it didn't work the first time.

Of course all profit estimations are thrown off by this but you wouldn't have to exit the program, manually kill the orders in the exchanges, erase the state file, and restart like you do now.

@scionaltera scionaltera added enhancement New feature or request help wanted Good candidate for contributions blocked This issue or pull request cannot proceed labels Jun 3, 2021
@scionaltera
Copy link
Member Author

Let's wait until the rxJava stuff is merged to do this. Right now it's going to be too complicated because we just sleep() while we wait for the orders to complete. After that we will have nonblocking code that will allow us to do stuff like check conditions and look at tickers.

@dazito
Copy link
Member

dazito commented Jun 4, 2021

I would prefer something more automatic, like a timeout. After X amount of time if both limit orders were not filled then we cancel them and start over. If one open order is not filled then we close/sell the filled one and cancel the open order.

This way we avoid more IO operations (check on the disk) and the bot can continue on it's own without needing human intervention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked This issue or pull request cannot proceed enhancement New feature or request help wanted Good candidate for contributions
Projects
None yet
Development

No branches or pull requests

2 participants