Day 1: I purchased 100 stocks of ABC for 100$. The stock went down and I purchased additional 100 shares for say 80$.
Now, my average is 200 shares for 90$.
Day 2: The stock went up and I sold all 200 shares for say 95$. I made an overall profit of 1000$ on the sale of all 200 shares. My question is would I be incurred a "wash sale" loss if I try to buy again the shares of ABC for say 90$. For the reason that although I earned a profit but I sold my first 100 shares for a loss of -500$?