@atd if u had written call option of 10800 and nifty closes at 10779 u have Won ur bet ( bet is nifty will not go above 10800). In this case whatever premium u collected when u wrote the option u can keep it . u need not square off ur position. As a writer u have won this bet and option expired worthless ( which is loss for buyer of the call option)

So don’t worry about wat premium it is currently running at. The option expired and u can now retain the originally collected premium. The blocked margin in ur trading account will also be released by the broker.

Now let us take another case where u may want to square off. Let us say jan1 2019 nifty is at 10910. Now u write a call option at strike price of 11000 1 lot for Jan 31 expiry… The premium for this is now say 100 rupees. So u will collect Rs 7500. X amount will be blocked in ur trading account.

Now 3 days passed, nifty suddenly came down to 10500. Now the same call option for 11000 strike is trading at just 40 rupees . means 40x75= Rs 3000. Now u login to ur account and see that now u r running a profit of 4500 ( sold at 7500 but same call option is now 3000 so profit is 7500 - 3000 = 4500)

Now u think. Today it is 10500 but wat if it rises next week and wat if by expiry date it becomes 120000. U don’t know but u decide to exit now with this 4500 profit. So now only u will square off by buying same 1 lot same call option at strike 11000 . by taking exact opposite position u are now exiting safely and u have made 4500 profit. Ur X blocked amount will be released by broker now itself and u are entirely out of this game.

But another brave option writer could have waited and if by Jan 31st nifty closes as 10900 also he can retain his entire 7500 as profit. X amount will be released only on jan 31 evening for him.