No, sorry, hold on...
If I have an open position of X contracts, the exchange will compute total margin for this position as some F(X) (as long as we're being all mathematical and stuff). This number is solely a function of the size and nature of the trade or portfolio.
I'll say it again. The margin determines the maximum leverage for a given futures contract. It gives you the upper bound on the number of open contracts that you can have with your account size.
What the OP is discussing is how to calculate the actual leverage while in position. For example, let's say my account is $100K, and I buy 2 ES contracts at 2470. What's my leverage? The answer is the formula given by the OP.
Last edited: