Home > EA & MT5 Knowledge Base > Risk & Money Management

Money ManagementRisk ManagementBeginner

EA Risk & Money Management — How to Calculate Lot Size and Set Your Risk %

Last updated: 2026-05-20 | Estimated reading time: 15 min

What ultimately determines an EA's real-world performance is money management, not the strategy itself. Even with the same EA, the difference between "an account that grows steadily" and "an account wiped out by a single losing streak" comes down to how much you risk per trade. This article explains the fundamentals of money management for protecting your account while running EAs.

Why Money Management Matters More Than Strategy

No matter how good an EA is, losing streaks are inevitable. Even a top-performing EA with a 60% win rate will statistically produce 5- or 6-trade losing streaks. Whether your account can survive those streaks is entirely determined by your money management.

If you risk 20% of your account on a single trade, five consecutive losses will cut your balance roughly in half. But if you cap your risk at 1% per trade, even ten straight losses will only shrink your account by about 10%. Same EA, same market — completely different outcomes.

Focus on "staying alive through losses" before you start hunting for a winning strategy. As long as you survive, a positive-edge EA will convert time into profit.

How to Set Your Per-Trade Risk %

Risk % defines what fraction of your account balance you're willing to lose on a single trade if the stop-loss is hit. Most EAs let you specify this with the RiskPercent parameter.

Here are general guidelines for risk %:

Risk %TypeGuideline
0.5% or lessConservativeHigh-volatility pairs or when running multiple EAs simultaneously. Suitable when prioritizing long-term stability.
0.5–1.0%StandardRecommended range for most EAs and beginners.
1.0–2.0%AggressiveOnly for single-EA operation when you have strong confidence in your edge.
Over 2.0%DangerousA losing streak can drain your account rapidly. Generally not recommended.
When running multiple EAs at the same time, think in terms of "total risk across all EAs," not the risk of each EA individually. If three EAs each use 1%, your combined risk exposure at the moment they all enter is 3%.

How to Calculate Lot Size

Once you've set your risk %, you need to convert it into an actual lot size. The formula is:

Lot size = (Account balance × Risk %) ÷ (Stop-loss width in pips × pip value per lot)

For example: account balance ¥100,000, risk 1% (= ¥1,000), stop-loss 50 pips, pip value ¥1,000 per lot → Lot size = 1,000 ÷ (50 × 1,000) = 0.02 lots.

Most EAs handle this calculation automatically when you set UseFixedLot=false (automatic risk % mode). If you use fixed lots (UseFixedLot=true), your lot size won't adjust as your balance changes — so you'll need to review and update it manually on a regular basis.

The minimum lot size on an XM Standard account is 0.01. If the calculated lot comes out below 0.01, your current balance may not be large enough to run that EA safely. Either increase your capital or choose an EA with a tighter stop-loss.

Compounding vs. Fixed-Lot Trading

Compounding (UseCompounding=true) automatically adjusts your lot size based on your current account balance. When you're profitable, the next trade uses a larger lot; when you're in a drawdown, it uses a smaller one. Your risk % relative to your balance stays constant at all times.

Fixed-lot trading (UseCompounding=false) keeps your lot size anchored to your starting balance. Growth is slower because lots don't increase as your account grows, but the dollar impact of drawdowns is also held constant.

FactorCompoundingFixed-Lot
Growth speedFast (snowball effect)Gradual (steady)
During drawdownLoss amount can also growLoss amount stays fixed
Best suited forGrowth phase after edge is confirmedValidation period or when prioritizing stability
CautionWatch out for naive "annual return × 10 years" projectionsEasy to miss out on account growth
Be wary of marketing claims like "compound annual return of X times." With compounding, a single large drawdown can collapse the foundation, making recovery dramatically harder. The prudent approach is to confirm stability on a fixed-lot basis first, then switch to compounding once you have solid confidence in your edge.

Margin Level and Account Headroom

Margin level — calculated as equity ÷ required margin × 100 — is a measure of how much headroom your account has. When it falls below 100%, you can no longer open new orders; if it drops further, a forced stop-out (margin call) is triggered.

To run EAs safely, it's essential to maintain a comfortable margin level at all times. Many EAs include a UseMarginEmergencyClose safety feature that force-closes all positions if the margin level drops below a set threshold.

Margin LevelStatus
1,000% or morePlenty of headroom. Safe operating range.
300–1,000%Normal. No cause for concern.
150–300%Caution. Suspect overtrading or oversized lots.
Below 150%Danger. Consider setting an emergency close threshold.
If your margin level tends to drop low, your lot sizes may be too large or you may be holding too many positions at once. Reduce your risk % or cut the number of EAs running simultaneously.

📈 Diversify Risk Across Multiple EAs

The next step after money management is a portfolio strategy that combines low-correlation EAs to smooth out drawdowns.

Read the Portfolio Strategy →

Frequently Asked Questions

Q: What risk % should I use?

For most EAs, 0.5–1.0% is the recommended range. If you're a beginner or running multiple EAs simultaneously, starting at 0.5% or below is the safer choice. Settings above 2% can significantly reduce your account after just a few consecutive losses — generally best to avoid.

Q: Should I use compounding or fixed-lot trading?

Fixed-lot trading is recommended during the validation period or early in your operation, because the dollar impact of drawdowns stays constant. Once forward testing confirms your edge, you can switch to compounding to accelerate growth — that's the prudent order of operations.

Q: Which is better — fixed lot or automatic risk %?

Automatic risk % (UseFixedLot=false) is generally the safer choice. Because lot size adjusts automatically with your account balance, it prevents both over-betting and under-betting. Fixed lots don't reflect changes in your balance, so you need to review them manually on a regular basis.

Q: How much capital do I need to run an EA?

It depends on the EA, the currency pair, and the stop-loss width. The minimum threshold is the balance at which the automatically calculated lot (based on your risk %) doesn't fall below the minimum lot size (0.01 on XM Standard). High-volatility pairs like GOLD typically require more capital.

Q: What margin level should I maintain?

At a minimum, keep it above 300% — ideally above 1,000%. If it's dropping below 150%, your lots are too large or you're holding too many positions. Reduce your risk % to adjust.