Margin is a deposit, not a cost
Open one lot of EUR/USD at 1.0940 and you are controlling $109 400 worth of currency. At 1:100 leverage your broker sets aside $1 094 of your equity as a deposit and lends you the rest. That money is not spent — it comes back the moment the position closes. It is simply unavailable while the trade is open.
margin = contract size × lots × price ÷ leverage, converted into your
account currency.
Margin level is the number to watch
margin level = equity ÷ used margin × 100. At 1 000% the account is
barely committed. At 100% every cent of equity is holding positions open. Below that, brokers start
closing trades for you, worst first, at whatever price is available — which is generally the worst
possible moment.
Leverage does not set your risk
This is the part that costs people accounts. Your risk on a trade is the stop distance multiplied by the position size. Leverage only decides how much of the account is locked up meanwhile. Going from 1:100 to 1:500 does not make a trade safer or more dangerous — it makes it possible to open a position five times larger, and that is the part that ends badly.
The useful discipline: size the position from your stop first, then check the margin here to make sure the account can actually hold it.