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.