When attempting to sell a share of a particular instrument, you may receive a message saying, ‘You have to buy this equity before you sell it’.
This message can appear if you already have a pending sell or sell (market) order on the position you wish to close. To execute your current sell order, you must first cancel all pending and previous orders.