Username: Password:

Author Topic: Feature request: bag management  (Read 8714 times)

Offline kyle

  • Rookie
  • *
  • Posts: 1
    • View Profile
Feature request: bag management
« on: June 18, 2017, 09:27:26 PM »
I would love to see a feature in gunbot where it sells all the coins of a pair if you've been holding that pair for more than X amount of time.

The situation that I've been seeing is that the bot will buy a pair and then the pair might drop 10% and stay there. It never gets low enough to cross the security margin (security margin hedges against a severe coin collapse, but not against coin stagnation). In these cases, the portfolio value will usually slowly go down in value and in times when the whole market is on a downtrend, the bot might have spent the whole balance of the base pair and not be able to sell or do any trades for days, essentially missing out on a lot of value it could be capturing.

Some considerations:

* The bot should track multiple trades with the same pair separately.
Situation: The bot sold some of the coins while it was high but now it's low and it has a small balance left, but later bought more coins. I think it would probably need to have a separate counter for each trade so that when the time threshold passes for the small balance from the old trade, it sells just those coins and doesn't interfere with the current new position that's holding.

* It should try to get a locally optimal price.
For example, let's say it buys a pair but that pair plummets and then is hovering at a lower value. After the X timer passes (let's say 48 hours), then it calculates the price spread of the last Y amount of time (let's say 4 hours), and says Ok I'm going to try and get 80% of the price spread of the last little bit of time (time Y). Then over the next Z amount of time (let's say 6 hours), it waits until it hits that 80% mark and sells your bag then, essentially getting the best price it can reasonably get at this new range that the pair has been trading at. If after the 6 hours (time Z) it hasn't been able to sell, then it just sells at whatever price it's currently at.

I haven't done any backtesting or anything to see if this strategy would be profitable, but based on my anecdotal experience of following roughly this strategy manually, it seems like it would help the situation. For me, I've noticed if I let the bags sit then the portfolio value either stays level or slowly goes down, yet if I sell the bags for a loss (for ones that it's been holding for too long), then it doesn't take long for it to bounce back up to net zero from when the market (or just the individual coin) did whatever it did to cause the bags to be held.