I today write 1000 shares of 17900 put at 27 premium of bank nifty, bank nifty closed above 18000 but premium increases to 31, whats my profit sir?

 @Nishant,

I wonder how come you are trading without knowing what profits you will get by shorting that share.

I suggest you study the option theory thoroughly before applying it.

BTW, your profit comes around 26955 rupees. Use the brokerage calculator and add the stamp duty charges to it too.

http://zerodha.com/brokerage-calculator

Buy Price 0.00
Sell Price 27.00
No. of shares 1000
Turnover-Buy 0.0000
Turnover-Sell 27000.0000
Total Turnover 27000.0000
Brokerage 20.0000
Securities Transaction Tax (STT Total) 4.5900
Transaction/Turnover Charges NSE 14.3100
Service Tax 4.1172
Education Cess 0.0823
Higher Education Cess 0.0412
SEBI Charges 0.0540
Total Charges 43.1947
Stamp duty 1.6200
Total Charges with stamp duty 44.8147
Profit before Tax and charges 27000.0000
Net Profit/Loss 26,955.1853

But If you are writing the option you must square off it before expiry or else exchange will put penalty for not doing this ? Am I correct?

Exchange will not do such a thing. They will not levy penalty. Squaring off or not is option writer/buyers own choice.