binance-trading-bot icon indicating copy to clipboard operation
binance-trading-bot copied to clipboard

Selling only traded amount, not previous holdings?

Open dasbts opened this issue 2 years ago • 4 comments

Hey, I have searched the issues and the Wiki and only found what seems to confirm my belief, so thus asking here.

Version

Running Version: v0.0.93 (26a1edc) Latest Version: v0.0.93

Description

I have open positions from before, in multiple coins with multiple trade prices due to use of DCA trading. I want to keep holding these, however I also want to use this bot. It seems like the bot will sell 100% of my coins, rather than 100% of the trade it opened, is this true? It seems as this bot is only made for those who have never traded before and start at zero portfolio. Why are we not able to choose to sell the accumulated bot quantity rather than only selling all our quantity in that coin for the portfolio? The thing is, yes, I can likely set the last buy price, but since I have bought in at multiple occasions, selling at say 2% higher than that previous price, it would not work in case it would also sell the quantity from previous buys at other prices.

It seems like this also confirms that theory. https://github.com/chrisleekr/binance-trading-bot#sell-signal

Also, it seems in the Wiki that it recalculates this last buy price when doing a manual trade, but still, if we're not able to set all the historical buy prices, will this really matter as I suppose it recalculates it based on the constraint of having done all the trades within the bot, thus having historically recalculated the last buy price for each trade, data which is not available if done outside the bot.

dasbts avatar Nov 02 '22 22:11 dasbts

Oh and why I'm asking this is because I reached a point of buying, but was not permitted due to: The current price reached the trigger price. + But you have enough ${baseAsset} to sell. + Set the last buy price to start selling. + Do not process buy.

dasbts avatar Nov 02 '22 23:11 dasbts

Yeah this seem to confirm my question, so I would say this is more of a feature request than a question then: const orderQuantity = parseFloat( _.floor(freeBalance - freeBalance * (0.1 / 100), lotPrecision) );

Is it possible to get the bot to instead of using the freeBalance, use only the balance that the bot has used in the grids? I guess for now I have to somehow stake my ETH and BTC so I can buy more with the bot safely. Hopefully you are able to look into this. Thanks for the great work!

dasbts avatar Nov 02 '22 23:11 dasbts

@dasbts

What you investigated is correct.

Unfortunately, I don't have time to add a new feature.

chrisleekr avatar Nov 04 '22 10:11 chrisleekr

Same right now, sadly, would love to help with this. Maybe in the near future. Something I suggest however after thinking about it is to allow the user to lock current holding amount and then adjust the free amount to current holding minus the user locked amount, or something in this direction.

EDIT: No, this would only be for purchases ofc. but something similar maybe would be possible for "locking" the current holding so it won't trade with it at all.

dasbts avatar Nov 04 '22 11:11 dasbts