Can I sell a Stock and then buy it in MIS on the same day?

I had stock of JindalSteel that I held for many days and then I sold it out and on the same day I bought it again in MIS. Now when I’m trying to convert the position of MIS to CNC, I’m getting an error. What can I do?

Might be you don’t have enough margin to convert the position due to intraday loss.What is the error you are getting while converting?

Recently started posting on this trading Q&A board and heard a lot MIS and CNC. i could guess CNC as cash n carry but what is MIS (???) .however with my broker i can anytime sell/buy any script and square off same day by buying/selling .if i do not /can not square off same day it automatically results in delivery.T and Z group shares if i do buy and sell same scrip same day the same will not be squared off but all deals will result in delivery.why should i need to inform the broker while placing order if the same is for square off or delivery ? my decision depends on how market price behave .