To sell this equity you need to buy it first?

This message can appear if you already have a pending order on the position you wish to close. So, you should cancel all pending orders with that position and then place a new sell order.