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

Infinite remove last buy price loop if rest of grid trades removed #583

Open
uhliksk opened this issue Jan 12, 2023 · 10 comments
Open

Infinite remove last buy price loop if rest of grid trades removed #583

uhliksk opened this issue Jan 12, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@uhliksk
Copy link
Contributor

uhliksk commented Jan 12, 2023

Version

v0.0.96

Description

When rest of grid trades after already executed ones are removed and stop-loss is triggered, it will cause infinite loop of trailingTrade crashes trying to remove last buy price.

To Reproduce

  1. Add 15 grid trades.
  2. Wait until 10 grid trades are executed.
  3. Open symbol settings.
  4. Wait for 11th buy grid trade order is opened in background.
  5. Remove last 5 grid trades while 11th buy grid trade order is still opened.
  6. Bot will try to write closed order in non-existing grid trade causing an infinite loop.

Expected Behaviours

It should remove last buy price.

Screenshots

image

Additional context

@uhliksk uhliksk added the bug Something isn't working label Jan 12, 2023
@chrisleekr
Copy link
Owner

@uhliksk, any chance you found the root cause?

@uhliksk
Copy link
Contributor Author

uhliksk commented Jan 13, 2023

@chrisleekr I don't know yet but I found another bug while hunting this one. I'll create issue and PR today. :)

Edit: Maybe tommorow as yet I'm pretty good to reproduce bug with missing buy orders but still I'm not sure about the exact reproductions steps as I'm still hunting which parameter is actually causing buy order is opened without it recorded in the grid trade.

image

@uhliksk
Copy link
Contributor Author

uhliksk commented Jan 13, 2023

@chrisleekr I found this one #583. I'll edit reproduction steps as there is another condition to get it crashed.

Sometimes there is a big difference between what I think I've done and what I've really done before the bug occured. :)

@zulu14
Copy link

zulu14 commented Jan 20, 2023

Hi, i confirm i have the same issues,
infinite price removal for all symbol,

(i have only one setup buy and 1 sell grid ever configure)

log for a random sybol

01:40:14.848 97e36f783e78 - remove-last-buy-priceBalance is not enough to sell. Delete last buy price.

@chrisleekr
Copy link
Owner

@uhliksk @rando128 @habibalkhabbaz
Sorry for random issue with leaving the message.

I am considering releasing a new version to prepare my PR #539.

Are any fixes pending for this release?

@rando128
Copy link
Contributor

Hi @chrisleekr, I'm working on a chore PR to move the next best grid amount calculations into the backend to have a cleaner front implementation (in preparation for a future functional improvement). It should be ready during the weekend. You can release before if you want though.

@chrisleekr
Copy link
Owner

chrisleekr commented Feb 10, 2023

@rando128 👍 I can wait! Let me know!

Now I think I should've opened new issue, not using this issue. Sorry @uhliksk I won't do next time.

@uhliksk
Copy link
Contributor Author

uhliksk commented Feb 10, 2023

@chrisleekr No problem. I'm also working on PR to fix #594, but I was busy last few weeks and didn't finished it yet. If you can wait, I'll prepare it for next week.

@chrisleekr
Copy link
Owner

Nice @uhliksk thanks! I will wait. :)

@habibalkhabbaz
Copy link
Contributor

Hi @chrisleekr

I am looking for the same issue that @uhliksk is looking for.
However, unfortunately I didn't get the time to see the main cause of that but yes, we have to find a solution first before releasing because the bot is continuously stopping at some point.

@uhliksk
Let me know if you need any help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants