Hello! We have received your bug report regarding the discrepancy between deal closures on Gainium and your Bybit exchange for your DCA Hedge Bot. Thank you for providing the bot link; this is very helpful for our investigation. We will update you shortly on our findings.
I think this is because the way we calculate order profits and the way the exchange does is different. For the exchange, they aggregate all orders into a single one, so the entry price is the first order for that pair and the pnl is on the average price of all positions. We only calculate pnl of a single trade, which is the way to do it to be able to get strategy statistics.
Agreed. If there are multiple trades open on Gainium for a single pair, this could indeed explain the differences. The exchange doesn’t know anything about the meta object “trade” and only sees all the orders. The average price of all those orders on the exchange will certainly be different from the average price of a few of those orders belonging to a Gainum trade. But at least once all orders are filled, the results of all trades should even out and show similar values on the exchange and on Gainium.