Merge deals lead to error in available funds

Bug info:

Hello!

I don’t know if this is a bug or not but here is my problem. I have been merging some deals and I found that while merging them, my available funds were increasing as if these deals do not exist anymore, I’ve gone from 500$ to 3950$ available funds but there was no TP/SL reached. I looked into my Bybit account and the problem could come from there as the funds are marked as available in Bybit.

I don’t know if, by the mecanics of the “merge deal” function, these funds are really available and is not really optimal because if these funds are used for other bots, then when the merged deals will reach TP, there will not be enough funds, so this means that I have to manage funds that are normally “locked” in other deals/bots

If this is the case, the solution would be to lock the funds when merging deals and not let them free until TP/SL reached.

I don’t really have a bot to share as it is a generalised problem to all trading bots that can merge deals

Thanks in advance

Merge deals cancel all tp and SL. So if the individual deals had them you will see a decreased in locked amount.

Yes but if the strategy still have a TP or SL, they should be recalculated with the new merged deal… If it’s not the case, how do I set up a new TP/SL? I mean, of course all the former TP and SL are cancelled, but then the deal, if a new TP/SL is not recalculated, it will be just open forever. I consider that this should be treated as a bug and not a feature request as I don’t see the point of merging deals if the only way to close them is manually :slightly_smiling_face:

We don’t have the option to recalculate the tp or sl, you can easily add those by clicking on edit deal from the deal menu.

Yes, even though it’s possible to calculate the average price based on the merged deals’ average prices and size, it may be difficult to transfer safety order, stop loss and take profit settings. I guess it’s even necessary to cancel open safety orders and stop losses. Is there a way to reconfigure DCA mode and stop loss? In the case of the take profit maybe the configuration of the target deal could be used.

Ok but I still don’t understand why there is a decrease in locked amount if TP and SL are not there anymore, I mean the deal still exists so these funds cannot be usen for other things right? I am in spot so not using sophisticated strategies with cross margin or leverage, what I buy is what I get in spot…

What has happened to your safety orders? Can you figure out what the deal sizes of your merged deals were? I would expect that open safety orders, stop losses and take profits were cancelled. The funds should still be there though. They should be managed by the target deal now.

So as you can see in that screenshot, this is a merged deal and the cost is about 1543$, the thing is that, as soon as I merged all the deals, this 1543$ appeared as available funds. The size of the merge is correct because it has not increase / decresed from before merging. The funds are in my wallet but as available funds and not “locked” for the bot

Because funds are only locked wihen you send a limit order (tp and sl are limit orders), and by merging those are removed.

Ok in fact there is super useful thing that is already here when editing deal, and is the “Reset global” function. I tried and it worked well, the funds are not available anymore and the TP/SL are setted to what is were before

What I suggest to simplify things and avoid this question again is that instead of the current path :

  1. Merge > 2. Go to Edit deal > 3. Reset to global

Is to make appear a message when you merge the deal, where you can choose different options 1. remain the deals cancelled, 2. resetted to global or 3.Edit. I am not a web developper but as these options are already there, it is probably only a matter of redirecting links inside Gainium

1 Like

Then it would be obvious that we need to take action to be able to get the deal closed at some point.

1 Like