LasticotSoftware / Astibot

Astibot is a simple, visual and automated trading software for Coinbase Pro cryptocurrencies (Bitcoin trading bot)
MIT License
205 stars 48 forks source link

[strategy] allow sale as first operation #10

Open alex-dp opened 3 years ago

alex-dp commented 3 years ago

It should be possible for the bot to start with a sell operation, when balance is available in the target currency.

rogerthomas84 commented 3 years ago

@alex-dp - I personally don't think this is a good idea. The code doesn't know enough about the current balance in the account to make a call on. For example, if you'd spent $5k on Bitcoin back in May and launched this as a brand new user right now, the code would sell the balance and you'd lose nearly half of what you bought it for (if that makes sense). I'm new to using it and just accepted that I need to make the first sell decision of my existing coins before it could buy because I know what I spent on it.

I see an argument for there being a manual 'Sell all' button or something similar though, but that would need the user to provide the figure to sell at.

drkevorkian commented 3 years ago

been following this for a bit, since jan. I've not had time to add in, but checking first for a purchase date/price and if not found asking manually is the only viable option i see, without adding in support for other exchanges to check there for a purchase/price history. Possibly adding in a portfolio.json file with the required information would do.