Margin formula for MIS Cover Orders

I am placing orders manually after my system generates signals, because I have to be mindful of the margins as placing limit orders blocks the margin even though the trade will never execute. I want to understand how the margin used is calculated for MIS CO orders. It is written on Zerodha info that margin provided is calculated using stop loss.

Suppose I buy 1 stock of INFY at price of 100 and SL at 98. What will be the formula to calcualte margin and leverage used?
I already know about the web calculator but I cannot use that as I have to place orders automatically.
Sign In or Register to comment.