Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proffit and Loss is incorrect and is double counting closed positions #2711

Open
cbabione opened this issue Aug 21, 2024 · 1 comment
Open

Comments

@cbabione
Copy link

cbabione commented Aug 21, 2024

Describe your environment:

  • OS : Ubuntu 24.02 with Docker
  • Python Version: Version that is included with Octobot 2.0.3 Decker Container

Describe the problem:
Closed order fees are being double counted using the Grid Trading strategy. These fees were already assessed and accounted for in previous transactions. The result is that the PNL reports are inaccurate and show a lower profit (or a loss). The PNL report is inconsistent with what is actually being reported on the exchange (Coinbase in my case). The exchange is showing a correct profit summary from the same trading pairs. I have attached a screenshot highlighting the incorrect entries.
Screenshot 2024-08-21 114554

Expected behavior
Orders should only appear once in the PNL report and graph. Either a coupling of Buy-to-Open and Sell-to-Close, or Sell-to-Open and Buy-to-Close. Once a position is closed, it should not have any more reporting in the PNL report. Closed entries should not bridge to the next open position.

Steps to reproduce:

  1. Set up a Grid Trade strategy bot assigning a profitable spread and increment after fees
  2. Let bot run until you have cycled between two parts of the spread a few times
  3. See the double entries in the PNL report
@GuillaumeDSM
Copy link
Member

Nice find, thank you @cbabione !
We will work on fixing this

@Drakkar-Software Drakkar-Software deleted a comment Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants