dscotese / kraken-grid

A bot that extends grid trading once you use it to create a grid.
GNU General Public License v3.0
9 stars 3 forks source link

Feature Request: profit over time by symbol #11

Closed dscotese closed 1 year ago

dscotese commented 2 years ago

The set command currently miscalculates profit if the user cancels and resets the grid for any crypto on which there are unfinished round trips. A solution to this would be to collect all executed orders for each crypto and display the difference between the total revenue from sales and the total spent on buys. If the total units bought is different from the total units sold, then add in the difference multiplied by the current price.

There is a second source of miscalculation. The code processes only the most recent orders which means that if any round trips started before the earliest one it gets, the first leg of that round trip will be missing. I suppose this is more of a failure to precisely define what "profit" means, so it's a facet of the issue that I will ignore for a while.

dscotese commented 1 year ago

In the interest of narrowing the purpose of this code, I am closing this issue with the idea that a tool different than the one managing profitable round trips through an exchange should be responsible for tracking the profitability of any specific crypto. An add-on makes a little sense, but all the info required is on the exchange anyway.