This happened to me recently as well. I think I figured out why it's doing it. GunBot will sometimes inappropriately average together two buy prices, then sell based on that falsely low buy price, even though the old buy was closed with a sale. The bot thinks it's selling at a profit, but it's actually at a loss since it's using a falsely low, averaged buy price, instead of the correct buy price. At first I thought this was from a glitch in Double Up / Average Down, so I disabled that, but it just happened again, so clearly it's not that. I think it's an error in how the bot determines closed sales and thus when it should average together two buy prices instead of just using the most recent one. Please see the attached screenshots.
Notice that the most recent sale was 100% of the coins from the most recent buy, so a totally closed sale, but it was sold at a loss despite stop limit not being hit. Also notice that in the previous closed trade (buy and sell), there were 24 CND coins left over, which equates to 0.1% of the transaction. Thus, perhaps only 0.05% of that 0.1% was used for the transaction fee (I use Binance with BNB for fees, so the transaction fee is 0.05%), and the remaining 0.05% was carried over to the most recent trade. Thus, the most recent trade attempted to average the buy prices, even though the sale was really made of 95-99% the most recent buy price, and only 1-5% the previous buy price. But by weighting the two buys equally and averaging the two buys, it resulted in a negative trade for 1%. Definitely a bot calculation error, and not Double Up's / Average Down's fault.