Can't liquidate position due to PDT restrictions

I am wondering how long one has to wait to close positions? I tried yesterday and was getting the same error… and today once more same thing. I seem to be able to buy shares just fine but can’t sell them the same day. thanks!

You have to hold overnight.

If you bought shares yesterday and then tried to also sell yesterday, that would be a day trade (and might be prevented due to PDT restrictions)

If you then bought more of those shares today, then you will need to wait until tomorrow to avoid PDT restrictions.

got it. it must be because I added more shares today then tried to liquidate the entire position. thanks for the quick response @mhopper