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

New trading rule modifier "BuyPriceOverride" #20

Open
mrhasbean opened this issue Jul 1, 2018 · 1 comment
Open

New trading rule modifier "BuyPriceOverride" #20

mrhasbean opened this issue Jul 1, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@mrhasbean
Copy link

mrhasbean commented Jul 1, 2018

Pair specific condition to reset the buy price and set the DCA level to 0 to allow the bot to trade out portions of bags. Would just require that the user create a sales order for a percentage of the pair at the exchange at an unachievable price (eg double the current price), then set these parameters so that the bot can trade out the remaining portion. Rinse and repeat until the bag is sold off.

The issue at present is if we create the sales order at the exchange, the bot does pick up the proper amount for sale, but uses the total amount (through purchase history) to calculate the price after the pair DCAs. For example, I have a pair that was at -42%, created a sales order for 87.5% of the amount I held so that I had sufficient funds on the account to DCA the remaining quantity 5 times if necessary. After the first DCA the margin dropped to -21% but the bot then recalculated the value and changed that to -36%. It has now DCA'd 3 times, which should have it down to around 6%, but it is still at nearly 22% instead, which means it will never climb its way out. I don't want to have to set up PT to do this because I can't replicate my DCA conditions in PT (without a lot of effort).

This idea could be extended to allow for automatic bag busting, but would require a fair bit more code to implement. This override would allow us to do it manually.

@mrhasbean
Copy link
Author

Ok, so it seems we might need this for another reason. This morning my (live) bot bought ADA, which I wasn't holding any of, but which I did have a very deep bag of previously that I transferred the balance to another account. The bot is now showing the previous DCA levels and margin for that coin, so even though I'm only holding a tiny amounts of it, the bot can't trade it out.

@jazzonaut jazzonaut added the enhancement New feature or request label Jul 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants