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

Dropping prices should cause smaller trades. #33

Open
dscotese opened this issue Apr 18, 2023 · 0 comments
Open

Dropping prices should cause smaller trades. #33

dscotese opened this issue Apr 18, 2023 · 0 comments

Comments

@dscotese
Copy link
Owner

dscotese commented Apr 18, 2023

#6 described an issue and a solution which involved solving another issue first and I closed it. This is the promised replacement and a proposal on how to make a lower overall account value (from the bot's perspective) translate into smaller trades at lower prices.

One of my concerns is generating too much traffic, clogging both your ISP and Kraken's ISP with new orders and cancellations. Since prices are changing all the time, what we should do instead of constantly cancelling and recreating trades with slightly different prices, is to make a best guess. There is already code in balancer.js (buyAndSell function) which sums up the portion of the users savings that the user wants in crypto (cryptp) so that the balancer can create trades that would be needed if the entire crypto market goes up or down, which is pretty close to what happens. This is how I imagine the best guess should be calculated. At some point, it might be worthwhile to add something that allows the user to specify that the bot should assume some additional mathematical relationship between the prices of some of their assets and the prices of other of assets. For now, if it ever seems useful, I will only implement code to assume that if the price of a crypto goes up or down far enough to justify a trade, the prices of the other cryptos will also have done about the same thing.

This issue is very low priority.

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