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

Extending the grid sometimes uses too low an amount. #22

Open
dscotese opened this issue Sep 27, 2022 · 1 comment
Open

Extending the grid sometimes uses too low an amount. #22

dscotese opened this issue Sep 27, 2022 · 1 comment

Comments

@dscotese
Copy link
Owner

I`m guessing this happens because the previous trade is only partially executed and the code uses only one part of the actual volume.

@dscotese
Copy link
Owner Author

dscotese commented Oct 5, 2022

Line 227 sets the volume of the original trade and lines 342 and 362 use it. As the lowest buy or the highest sell is being depleted, it will create another trade of the opposite type because of the conditional close, and that new trade will be the lowest sell or the highest buy, which is the one whose volume gets used on line 227. bSides (the record used to find the highest sell and lowest buy for a pair) could be used to record the highest volume of each side, but that would cause the grid to always be extended with the highest volume, and that's not always what we want. I'm leaving this alone and open for now.

dscotese added a commit that referenced this issue Dec 13, 2024
It now uses ESLint with the settings described in .eslintrc.
The function in bot.js, howMuch(), is used to create trades for the correct amount (given the current assets) when the grid is extended.
It does not yet adjust existing open trades, so only partially addressing Issue #33, but fixing Issue #22.
Circular dependencies have been eliminated to ease debugging.
Most imports of other modules in this project have been moved to init and bot.
Tests are still needed for the balance function and the webpage among other things.
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

1 participant