Bug info: I use a grid bot. According to the stats it has today 21.35 dollar profit. But it had only 20 sell orders of around 13.6 dollar.
I see that the purchase is incorrect. I stopped the bot and cancelled all the orders. And started the bot again. The purchase price in the bot says 4.354, on the exchange 4.709. I think the amount of 4.354 is the initial price. So it didn’t update the new base purchase price. So the profit stats aren’t correct.
For the profit amount, you cannot calculate it that way. Sell orders without a matching grid buy will be matched to the initial price, so the profit per sell is not always the same.
Can you show a screenshot of the exchange details you mentioned?
Thank you for reporting this behavior. This is actually designed intentionally. When you stop and restart the bot, it calculates the base order price based on all filled buy orders made by the bot, not just the initial one. This method allows for a more accurate calculation of the average purchase price of the base asset. This ensures that the bot can make trading decisions based on the true average cost.