PipWardenStart free

What is margin in forex?

Definition Margin is the part of a trader's equity that a broker sets aside as a deposit to open and hold a leveraged position, worked out from the position's size and the leverage.

Margin is the deposit your broker sets aside from your equity to keep a leveraged position open. It is locked while the trade is open and released when it closes. It is not a fee and not the most you can lose: the trade’s profit or loss comes from the full position size.

How MT5 calculates margin

For currency pairs, MT5’s Forex calculation mode is (MetaTrader 5 help):

Margin = lots × contract size ÷ leverage

The result is in the symbol’s margin currency, the base currency for most pairs. MT5 converts it into your account currency and can multiply it by a margin rate that the broker sets per symbol. The contract size, margin currency and rates are in the Specification window: right-click the symbol in Market Watch, then Specification.

The margin calculator does this for other pairs, gold and indices, in your account currency.

Leverage caps for retail clients

For retail CFD clients of EU brokers, the rules ESMA set in 2018, now applied by national regulators, cap the leverage on opening a position: 30:1 for major currency pairs, a 3.33% margin, and 20:1 for non-major pairs, gold and major indices, a 5% margin. Brokers regulated elsewhere may offer more.

Margin, free margin and margin level

The Trade tab (View → Toolbox → Trade) shows three linked numbers on the account line:

Field MT5 definition
Margin Money required to cover open positions and pending orders
Free margin Equity − Margin
Margin level Equity ÷ Margin × 100

Free margin shrinks as open trades lose, even though the margin itself stays about the same. When the margin level falls to the broker’s margin call level, the account enters the Margin Call state, a warning; at the stop-out level the broker starts closing positions. An order that needs more margin than you have free is rejected; an EA sees the return code TRADE_RETCODE_NO_MONEY, “There is not enough money to complete the request” (MQL5 docs).

The common mistake

Reading margin or leverage as risk. Margin decides how much of the account a position ties up, not how much a pip is worth: the example above moves $10 per pip at 1:30 and at 1:500. The risk comes from the lot size and the stop. How to calculate lot size and lot size on a $100 account work through it.

Margin in PipWarden

PipWarden sizes every trade from your risk percentage and the stop distance, not from the margin available. Before each order it estimates the margin the trade needs, from the broker’s own figure when MT5 reports one, and by default skips the trade as “Not enough free margin” if free margin afterwards would be below 20% of equity. The other checks run before each order are on the features page.

Frequently asked questions

Is margin a fee?
No. Margin is set aside while the position is open and released when it closes. What you pay for a trade is the spread, any commission and any swap; what you gain or lose comes from the full position size.
How much margin do I need for 1 lot of EURUSD?
1.00 lot × 100,000 ÷ leverage, in euros, converted into your account currency. At 1:30 that is €3,333.33; at 1:100, €1,000.00. Check the contract size and margin rates in your broker’s Specification window.

Educational content, not financial advice. Forex and CFDs are traded on margin and are high risk: you can lose money, and more than your deposit with some brokers. Examples use made-up numbers and show no real results. Read the risk disclosure.