How to place sell order while exit a buy order

Hai
I have taken an intraday trade , but when i want to exit, on the sell order i have placed limit, but the order executed at Market price. Is this right way of putting limit sell order or any other way to place sell order (this is on the stock whihc is already buy) Please clariy.

When you place LIMIT Sell Order, it should be above Current Market Price, if it is below CMP it will get executed at market price.

Thank you
But I have kept the target more than market price, still it has executed at current market price.