Username: Password:

Author Topic: GunBot v8.0.3 Sold for Loss by Incorrectly Averaging Buy Price (DoubleUp is off)  (Read 7905 times)

Offline PookztA

  • Rookie
  • *
  • Posts: 26
    • View Profile
This is the second time this has happened. The first time occurred on 1/17/18 when Double Up was activated, so I naturally thought it was due to an error in Double Up / Average Down buy price calculations / averaging. Thus, I disabled Double Up, but then it happened for a second time, just today 2/15/18. Both times it was a negative trade for a -1% loss, but it was reported as a very large profit (due to the incorrectly calculated / averaged, falsely low buy price).

I think I determined why it's likely doing this. GunBot will sometimes inappropriately average together two buy prices, then sell based on that falsely low buy price, even though the old buy was completely closed or almost completely closed with a corresponding sale. The bot thinks it's selling at a profit, but it's actually selling at a loss since it's using a falsely low, incorrectly averaged buy price, instead of the correct buy price. At first I thought this was from a glitch in Double Up / Average Down as I mentioned above, so I disabled that but it just happened again, so I feel strongly that it's not from Double Up. I think it's an error or glitch in how the bot determines closed trades, and thus when it should average together two buy prices instead of just using the most recent buy price. Please see the attached screenshots.

Notice that the most recent sale from 2/15/18 was 100% of the CND coins from the most recent buy, so a totally closed sale, but it was sold at a loss despite the stop limit not being hit (not even close). Also notice that in the previous closed trade (buy and sell) from 1/17/18, there were 24 CND coins left over from the previous "closed" or "almost-closed" trade. Thus, perhaps these leftover coins were carried over to the most recent trade, which is why it attempted to average the two buy prices together (one from 1/17/18, the second from 2/15/18). Thus, the most recent trade appears to have averaged the buy prices, even though the sale was really 98-99% made of coins purchased at the most recent buy price, and only about 1-2% made of coins purchased at the previous buy price. But by weighting the two buys equally and averaging the two buys, it resulted in a falsely low buy price and an incorrectly low sell price, and thus, a negative trade of roughly -1%. This is definitely a bot calculation error it seems, and not specifically Double Up's / Average Down's fault.  Again, please see attached screenshots below. Any help is greatly appreciated. Thank you for any attempts to help if anyone has any ideas or comments to share.

-Abe

UPDATE 3/8/18: GitHub post created on this topic: https://github.com/GuntharDeNiro/BTCT/issues/521

Temporary solution until this issue gets fixed:

Since v7.0.2 has a problem buying due to incorrect calculations of bag quantities (error was fixed in v8), I use v7 just to sell.
Since v8.0.3 has a problem selling due to incorrect averaging of buy prices (error not present in v7), I use v8 just to buy.

Thus, a temporary solution, is to run a v7 instance on one computer (or virtual machine) with impossible buy parameters (max buy 0.0 BTC, max cap 0.0 BTC), so that it will only be able to sell, and to run a v8 instance on a second computer (or virtual machine) with impossible sell parameters (gain 99%, max sell 0.0 BTC), so that it will only really attempt to buy.

In other words...

Run v7 just to sell, and v8 just to buy. Working great this way.
« Last Edit: March 12, 2018, 08:32:22 PM by PookztA »

Offline pnota

  • Rookie
  • *
  • Posts: 2
    • View Profile
I m having the same problems and i stop to use this bot for this reason.. the team wasn t able to help me until now and they say to wait for the latest release to see if there are improvements.. Did you worked out the problem?

Offline PookztA

  • Rookie
  • *
  • Posts: 26
    • View Profile
I m having the same problems and i stop to use this bot for this reason.. the team wasn t able to help me until now and they say to wait for the latest release to see if there are improvements.. Did you worked out the problem?

No, I haven't gotten any help or found a fix, but the losses have been minimal, like 1% or less, and all the positive gains have far out weighed the negative ones, so I continue to use my Gunbot.

Offline SirBonus

  • Rookie
  • *
  • Posts: 20
    • View Profile
I had the same problem... just go back to 7.02 stable. I double checked the numbers and the calculation of the 7.02 gunbot is fine. I guess the small assets of the previously trades mess something up...

Same topic:
https://gunthy.org/forum/index.php/topic,2928.0.html

Offline PookztA

  • Rookie
  • *
  • Posts: 26
    • View Profile
I had the same problem... just go back to 7.02 stable. I double checked the numbers and the calculation of the 7.02 gunbot is fine. I guess the small assets of the previously trades mess something up...

Same topic:
https://gunthy.org/forum/index.php/topic,2928.0.html

Thanks for the reply and tip. I will try going back to v7.0.2 for now. I also created a GitHub post to make sure this gets attention as it's a major problem since GunBot v8.0.3. is missing many profitable sells and forcing some negative sells. GitHub post created here: https://github.com/GuntharDeNiro/BTCT/issues/521

Thanks for your reply.

-Abe
« Last Edit: March 08, 2018, 04:58:26 PM by PookztA »

Offline PookztA

  • Rookie
  • *
  • Posts: 26
    • View Profile
Temporary solution until this issue gets fixed:

Since v7.0.2 has a problem buying due to incorrect calculations of bag quantities (error was fixed in v8), I use v7 just to sell.
Since v8.0.3 has a problem selling due to incorrect averaging of buy prices (error not present in v7), I use v8 just to buy.

Thus, a temporary solution, is to run a v7 instance on one computer (or virtual machine) with impossible buy parameters (max buy 0.0 BTC, max cap 0.0 BTC), so that it will only be able to sell, and to run a v8 instance on a second computer (or virtual machine) with impossible sell parameters (gain 99%, max sell 0.0 BTC), so that it will only really attempt to buy.

In other words...

Run v7 just to sell, and v8 just to buy. Working great this way.

Offline cosmochaos

  • Rookie
  • *
  • Posts: 6
    • View Profile
Hi PookztA,

Why not just using the parameters BUY_ENABLED=False in version 7 and SELL_ENABLED=False in version 8 ? It wouldn't work ?

Offline PookztA

  • Rookie
  • *
  • Posts: 26
    • View Profile
Hi PookztA,

Why not just using the parameters BUY_ENABLED=False in version 7 and SELL_ENABLED=False in version 8 ? It wouldn't work ?

Great point. Disabling buys on v7, and disabling sells on v8, in the way that you described, would work for standard Gunbot use. However, those parameters don't work for the Trading View plugin, which is what I am using. Good point though, thank you.

Offline PookztA

  • Rookie
  • *
  • Posts: 26
    • View Profile
Gunthar has officially acknowledged that Gunbot v9 will fix this problem, and that the release is now in beta testing phase. Not long now folks, can't wait for v9!