jazzonaut / IntelliTrader

Intelligent Cryptocurrency Trading Bot

Home Page:http://intellitrader.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New trading rule modifier "BuyPriceOverride"

mrhasbean opened this issue · comments

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.

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.