That's great.
Your buying cost = 50x40x(38+39) = Rs 154000
Your sell value = 50x40x(73+20) = Rs 186000
MTM Profit = Rs 32000
How did you reach to conclude that sell value will be higher in case of buying and squaring off both CE and PE, almost at same time? I noticed that CE and PE's buy and sell price as mentioned in your trade happened almost in same time.