Backstory
Last year I made 60k from earned income and 25k from moving an investment - I was forced to realize the gain even though I reinvested into a managed portfolio. All in all I'm taxed at 85k.
Problem
I gave all this info to my CPA hoping to write off as much as possible including a ~10k contribution to my IRA (5k roth, 5k simple). However my CPA told me that I can't write off the IRA contribution because the money I would be writing off came from an investment.
Question
Does this make any sense? Is there any way around this?