Hello @anthonyT
Thank you for reaching out to the Community regarding your issue. I do apologize for the late response. I was thinking about it and one of the possibilities you could use is instead of buying and selling shares you could add and remove shares. This will take the cash out of the equation so you can then create the removal of the original shares and add the ones to replace them. I believe this would be the most forward option but my knowledge is limited in investing.
Let us know if this works for you! If not we'll see what other things we can attempt.
Thanks,
Quicken Francisco