kylerberry / JACT

Just Another Crypto Trader. (gdax crypto trading bot)
3 stars 0 forks source link

remaining size too small to place further orders #30

Closed kylerberry closed 6 years ago

kylerberry commented 6 years ago

https://github.com/kylerberry/JACT/issues/29

no solution is really ideal. the first solution throws off a lot of zero checks and complicates total calculations. The second solution also complicates calculations and introduces the possibility to sell the remainder at a loss. Opted for if a position > 0 and < minimumSize for that product, set the order size to the minimumSize. This still makes calculations a little weak, but will force the bot to completely sell off a position (and then some) before moving on.

kylerberry commented 6 years ago

a future solution could be to once again change the time at which and how positionsize and totals are calculated.

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 44


Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/TraderBot.js 2 3 66.67%
lib/PortfolioManager.js 13 15 86.67%
<!-- Total: 15 18 83.33% -->
Files with Coverage Reduction New Missed Lines %
lib/PortfolioManager.js 1 80.5%
lib/TraderBot.js 1 48.92%
<!-- Total: 2 -->
Totals Coverage Status
Change from base Build 42: 2.2%
Covered Lines: 238
Relevant Lines: 402

💛 - Coveralls
kylerberry commented 6 years ago

@ZurabWeb i think i'm going to close this and make a PR with a different solution. i kind of hate this one

going to give up on forcing the bot to sell 100% of a position before it can buy another