sthewissen / Mynt

An Azure Functions-based crypto currency trading bot; featuring 10 exchanges, 25 indicators, custom strategy support, backtester and more
BSD 3-Clause "New" or "Revised" License
238 stars 130 forks source link

Allow the bot to run in its own bubble #11

Closed sthewissen closed 6 years ago

sthewissen commented 6 years ago

We should allow the bot to be running in its own bubble, independent of any other trades you're doing. When you set the max amount to trade with to 0.2 BTC it should only use its maximum amount of 0.2 BTC. If you make a loss on a trade and only have 0.18 BTC left it should only use that 0.18 BTC for a next trade. Also when selling e.g. ETH for a trade it is currently doing it should not sell any other ETH you have on your account.

This way any profit above 0.2 BTC is also automatically considered profit since it's not being used again. A setting might be added to toggle this behaviour to use profits in next trades.

sthewissen commented 6 years ago

This is fixed on develop by creating a Trader object that manages its own trades and money pool.