Margin Penalty in spite of MTM profit

#1
Suppose, at start of trade on 17th Oct 2019 I had Rs. 143000 fund balance and margin requirement at start of trade was 1,40,000 to buy 2 lots of Yes bank. I bought 2 lots and decided to carry forward. Stock price increased by 7 rupees from my buying price till close of trade giving me MTM profit of Rs. 30,800.

Due to increase in price at the end of day margin requirement was increased to about 1,65,000. So now new margin is applicable. In such a case it seems that at EOD even though I have 143000 + 30800(MTM) = 173800 I get into margin shortfall scenario of the 165000 - 143000 = 22000 whereas the margin increased due to increase in price where I also have MTM profit. In such a case based on Margin Statement a shortfall of 22000 is shown. As I understand in such a case there should not be any penalty for 17th Oct, is this correct understanding? My broker has been consistently charging penalties in such cases.
 
#2
most of the brokers are having different set of rules to calculate margin shortfall amount, bcas the collecting penalty is the additional revenue of broker.
in this case MTM, someone clarify clearly with exchange rules.

Happy Trading