ForexCopilotEA

Europe

Running Expert Advisors in Europe: ESMA Leverage Limits, Protections and What They Change for EAs

By Benjamin Lee · Updated · 8 min read

If you trade from the European Union, the rules that apply to your leveraged account were set by the European Securities and Markets Authority and enforced by your national regulator. They cap leverage, force positions to close before an account goes negative, and require a standard risk warning. They also change how an Expert Advisor behaves, because grid depth, margin and lot size all depend on leverage. This guide explains the rules in plain language, what they mean for an EA, and how to check a broker before you connect one.

Key takeaways

  • For retail clients, ESMA caps leverage at 30:1 on major currency pairs and 20:1 on gold.
  • Brokers must close positions when margin falls to 50 percent of the required minimum.
  • Negative balance protection means a retail client cannot lose more than the money in the account.
  • Leverage limits do not limit risk. Lot size and stop distance do.
  • Check a broker's regulator and licence number on the regulator's own register, not on the broker's website.

What ESMA's CFD rules say

In 2018 ESMA restricted the sale of contracts for difference to retail clients, and national regulators applied the measures across the EU. They cover the instruments an EA trader uses most: forex pairs, gold, indices and other CFDs. The main points, as ESMA published them, are in the table.

ESMA retail CFD leverage limits at opening a position
UnderlyingMaximum leverageMargin needed at that limit
Major currency pairs30:1About 3.3% of the position
Non-major currency pairs, gold and major indices20:15% of the position
Commodities other than gold, and non-major equity indices10:110% of the position
Individual equities and other reference values5:120% of the position
Cryptocurrencies2:150% of the position

Three other protections come with the limits. A margin close-out rule makes the provider close one or more open CFDs when the account's margin falls to 50 percent of the minimum required. Negative balance protection sets an overall limit on how much a retail client can lose, so an account cannot owe the broker more than it holds. And providers must show a standardised risk warning that includes the percentage of their retail accounts that lose money. Restrictions on incentives to trade also apply.

What the rules mean for an Expert Advisor

Many Expert Advisors were designed and tested on accounts with leverage of 100 to 1, 500 to 1 or more. Run on a 30 to 1 account, the same lot size needs far more margin, and an EA that was comfortable with many open positions can run short of free margin much sooner. That does not make the EA unsafe, but it changes what it can do.

Margin for common EA positions at the ESMA limits (illustrative)
PositionNotional valueLeverage capMargin needed
0.10 lots EURUSD10,000 euros30:1about 333 euros
1.00 lots EURUSD100,000 euros30:1about 3,333 euros
0.01 lots XAUUSD, gold at 3,000 dollars an ounceabout 3,000 dollars (1 ounce)20:1about 150 dollars
0.10 lots XAUUSD, same priceabout 30,000 dollars (10 ounces)20:1about 1,500 dollars
  • Grid and martingale EAs feel this first. Each added position uses more margin, and with less leverage the account reaches the 50 percent close-out level sooner. The close-out can end a grid in the middle of a trade, before the EA planned to exit.
  • Scalpers are less affected, because they hold small positions briefly, but high-frequency EAs still need enough free margin for several open trades.
  • A multi-pair EA that opens trades on several symbols at once needs margin for all of them together. Add the totals before you decide the lot size.
  • Backtests assume a leverage setting. Set the Strategy Tester's leverage to match your real account, or the margin behaviour will not match.

Use the margin calculator to check any position and the lot size calculator to turn a risk limit into a lot size. In both cases, work from the stop loss, not from the leverage.

Lower leverage does not mean lower risk

A leverage cap limits how big a position you can open for a given deposit. It does not limit how much you lose when the market moves against a position you chose to open. A 0.10 lot of gold risks 10 dollars per dollar of price movement whether the account is leveraged 20 to 1 or 500 to 1. If an EA's default lot size is too big for your stop loss, a European broker will let you place it up to the margin limit. The remedy is the same everywhere: set the lot from the stop distance and a risk percentage you chose in advance. See gold EA settings for the sums.

Choosing a broker in Europe for an EA

  1. Step 1: Check the regulator and licence on the register

    Brokers serving the EU are authorised by a national authority. Look up the firm's name and licence number on that authority's own public register and compare the website address. Do not rely on a logo on the broker's site.

  2. Step 2: Confirm EA trading is allowed

    Most brokers allow automated trading on MT5, but some limit scalping, hedging or high order rates. Read the order execution policy and the terms, and ask support in writing if it is unclear.

  3. Step 3: Compare spread and commission for your symbol

    Watch the live spread on your EA's symbol during European hours and around a news release. Compare standard and raw-spread account types.

  4. Step 4: Choose an account currency

    A euro account removes a conversion on the euro leg of margin and some fees. Check how the broker converts profits on instruments quoted in dollars.

  5. Step 5: Read the stop-out and negative balance terms

    Find the margin call and stop-out levels, which should align with the 50 percent close-out rule, and confirm negative balance protection applies to your account type.

  6. Step 6: Test on demo, then fund a small live account

    Run the EA on the broker's demo, then on a small live account, and compare fills and spread with the demo.

Practical points for European EA traders

  • A VPS in a major European data centre, for example in Frankfurt, London or Amsterdam, usually has low latency to European broker servers. Ask your broker where its trading server is. Our VPS guide covers the choice.
  • EA time inputs run on broker server time, commonly GMT+2 in winter and GMT+3 in summer, not on your local clock. Convert Central European Time carefully, and re-check after the clocks change.
  • Keep your own records. Export the account history from MT5 for your own accounting, and speak to a tax adviser in your country about how trading income is treated, since this differs by country.
  • Check any prop firm's rules separately. Prop firms are not regulated like brokers and set their own terms, as in our guide to EAs on FTMO.

Worked example: a grid EA on a 30 to 1 account

Take a grid EA on EURUSD that adds a 0.10 lot position at each step and has six positions open, on a 3,000 euro account. Each 0.10 lot is a 10,000 euro position, which needs about 333 euros of margin at 30 to 1. Six positions need about 2,000 euros. Under the close-out rule, the broker must close positions when margin falls to 50 percent of the required minimum, which in this example is when equity drops to about 1,000 euros. That is a floating loss of about 2,000 euros, so a third of the account remains.

On an offshore account with 500 to 1 leverage, the same six positions need only about 120 euros of margin, and a 50 percent stop-out would sit near 60 euros of equity. The account can then absorb almost its whole balance in floating loss before the broker intervenes. The EU rule therefore ends a runaway grid sooner and leaves part of the money, but it does not prevent a loss of two thirds in this example. Cap the number of grid steps and the lot size yourself.

Sources and further reading

  1. ESMA: ESMA agrees to prohibit binary options and restrict CFDs to protect retail investorsThe EU leverage limits, margin close-out, negative balance protection and risk-warning rules for retail CFD accounts.
  2. MetaTrader 5 Help: Basic Principles of Trading OperationsOrders, deals and positions, and how netting and hedging accounts differ.
  3. MetaTrader 5 Help: Virtual Hosting for 24/7 OperationMetaQuotes' own hosting service for running a trading robot around the clock.

Frequently asked questions

What is the maximum leverage for retail traders in the EU?

ESMA's rules set 30 to 1 for major currency pairs, 20 to 1 for non-major pairs, gold and major indices, 10 to 1 for other commodities, 5 to 1 for individual equities and 2 to 1 for cryptocurrencies, for retail clients.

Can I run an Expert Advisor on a European regulated account?

Yes, most European brokers allow automated trading on MetaTrader 5. Check the broker's terms on scalping, hedging and order frequency, and make sure the EA's margin needs fit the leverage limit.

Does negative balance protection mean an EA cannot lose my deposit?

No. It means a retail client cannot lose more than the funds in the account. An EA can still lose the whole balance, which is why lot size and stops must be set carefully.

Why does my EA run out of margin on a European account?

With 30 to 1 leverage, the same lot size needs more margin than on a 500 to 1 account. Reduce the lot size or the number of open positions, and set the Strategy Tester to your real leverage when you backtest.

Is it better to use a euro account?

If your income and costs are in euros, a euro account avoids converting margin and some fees. Profits on dollar-quoted instruments are still converted, so compare the broker's conversion rates before you decide.

Can I get higher leverage as a European trader?

Some brokers offer a professional client classification that allows higher leverage, but it requires meeting set criteria and removes protections such as negative balance protection. Check your regulator's rules and the broker's terms before you apply, and weigh the extra risk carefully.

Expert Advisors in these styles

Apply the checks above to any of these before you buy: read the manual, run your own backtest, and start on demo.

Browse Expert Advisors