As of now, we have not levied any restrictions towards maintaining a cash balance of 20%. However, you're recommended to maintain a minimum balance to meet M2M requirements.
If you've not kept the required cash in your account, and say you've incurred a loss, then you will have a debit balance of your loss incurred. You will either have to bring additional (required cash), or you will need to sell your securities in order to clear your Debit balance.
The loss will not be offset by the Margin amount.
Hope this addresses your query!