Risk Management for Forex Robots (EAs): Position Sizing, Drawdown Control and the Martingale Trap
The vendor page shows a profit curve; the EA's input dialog shows the truth — lot size, risk percent, recovery logic. Those few settings decide whether a forex robot survives its first bad month. Most robots do not die because their strategy was broken; they die because ordinary losing streaks, multiplied by oversized positions, emptied the account while the strategy itself was still working as designed. Risk management is the one part of automated trading you cannot outsource to the vendor, and this guide does it in numbers.
It is written for anyone running or buying an expert advisor. Every broker-related figure quoted here comes from our published 24-broker review, so you can verify it on the broker's own pages. Every other number is plain arithmetic — reproduce it with a calculator, and challenge it.
Why risk is the setting you cannot copy from a screenshot
A strategy that wins four trades out of ten will lose five or six times in a row as a matter of routine — no crash, no scandal, just ordinary probability at work. What such a streak costs you is decided entirely by position size, not by the strategy. That is why the order we recommend stays fixed: backtest first to learn the drawdown profile, then size positions around it, then demo, then small live capital.
If you are still building the foundation, the guide to trading bots explains the ecosystem, the getting started with your first trading bot guide covers the first weeks in practice, and the forex robot backtesting guide shows how to measure the drawdown that every decision in this article depends on. Vendor marketing can fake profit; it cannot fake the drawdown you compute from your own test.
The three position-sizing models
An EA trades exactly as big as its inputs tell it to. Three sizing models dominate the market, and they are not equally honest.
Fixed lots — simple, and quietly dangerous
A fixed lot means the same size on every trade, whether the account is up or down. On a growing account the robot quietly under-trades; on a shrinking one it quietly over-sizes, because 0.10 lots risk far more on $500 than on $2,000. Fixed sizing survives only when the lot is small relative to balance — 0.01 on a $1,000 account is a working floor — and vendors who ship default fixed inputs rarely mention it.
Percent risk per trade — the default we recommend
The formula: lots = (equity × risk%) ÷ (stop in pips × pip value per lot). With $1,000, one percent risk, a 25-pip stop and $10 per pip per lot, the position is 10 ÷ (25 × 10) = 0.04 lots. Lose five trades in a row and the next one still risks one percent of what is left — the model shrinks itself exactly when it should, which is the behavior martingale reverses.
A working range of 0.5–2% per trade is where most serious EA traders stay: low enough to survive long streaks, high enough for the math to matter. The LotSmith user guide shows how the inputs map to real orders, and the LotSmith product page calculates risk-based lot sizes for your account and pairs directly.
Sizing calibrated to your own backtest drawdown
Whatever model you pick, calibrate it against the maximum drawdown of your own backtest, not the vendor's. If your test lost 25% at one percent risk per trade, halving the risk to 0.5% roughly halves that drawdown in money terms — approximately, because compounding makes the relationship slightly nonlinear, but the direction never lies. Size so the projected drawdown stays inside what you can tolerate without touching the inputs, and you have removed the single biggest reason traders abandon working systems.
Reading drawdown like a survivor, not an optimist
Maximum drawdown is the deepest fall from an equity peak to the following trough — a depth and, just as important, a duration. The recovery math is brutal and worth memorizing: a 10% dip needs an 11% gain to heal; 20% needs 25%; 50% needs a full 100%; 60% needs 150%. Depth compounds against you, which is why two systems with equal net profit are not equal at all.
In our backtesting guide we flagged the profile that earns 20% while falling 60% on the way as a leverage accident, not a gem. No risk setting fixes such a curve: no percent, no formula, no recovery logic survives a system that routinely visits −60%. When the backtest shows that shape, the correct position size is zero until the strategy itself changes.
Depth also frames the sample problem. A drawdown measured on a handful of trades underestimates the streaks waiting in a full year — the backtest guide explains why fifty trades over three years is an anecdote rather than evidence. Run the test long enough for two or three deep streaks to appear, then size against the worst of them, not the average.
The martingale trap, in numbers
Martingale doubles the position after every loss so that one winner repays the streak. On paper it turns choppy systems into smooth equity curves, which is why it sells. In numbers it is a loan against a streak that has not happened yet — with interest.
Take the smallest plausible start: 0.01 lots, a 30-pip stop, and $10 per pip per standard lot, so the first trade risks $3 — about 0.3% of a $1,000 account. Doubling after each loss gives:
| Trade # | Lot | Loss at stop | Cumulative loss |
|---|---|---|---|
| 1 | 0.01 | $3 | $3 |
| 2 | 0.02 | $6 | $9 |
| 3 | 0.04 | $12 | $21 |
| 4 | 0.08 | $24 | $45 |
| 5 | 0.16 | $48 | $93 |
| 6 | 0.32 | $96 | $189 |
| 7 | 0.64 | $192 | $381 |
| 8 | 1.28 | $384 | $765 |
By trade eight the position is 128 times the base lot and the account has paid $765 — 76.5% of its starting equity. On a $1,000 account at 1:500 leverage the sequence dies here without any outside help: trade nine needs $512 of margin, and only $235 is left. The broker refuses the order, the promised recovery trade never runs, and the account keeps the $765 hole.
How likely was that streak? For a coin-flip strategy the chance of ten consecutive losses is one in 1,024 — about 0.1%. Rare in any single sequence. But a robot re-rolls the dice continuously: five hundred sequences of ten trades accumulate within months, and across them the probability that at least one hits ten straight losses is roughly 39%. The streak is not an accident waiting to happen; it is a scheduled event the calendar already contains.
Grid and averaging-down systems hide the same tail under different names — they widen, layer and average instead of doubling, and they die on the same streak. Vendors rarely advertise recovery logic on the sales page, so read the input list before anything else. The EA scam checklist treats undisclosed martingale as a trust red flag, the seven signs of a scam robot show how smooth curves are manufactured, and cracked or "free" robot versions are the worst offenders — the protective parts are exactly what has been stripped out.
Leverage, margin and the stop-out you never chose
The number to watch in the platform is the margin level: equity divided by used margin, times 100. Example: a $1,000 account at 1:100 leverage holds a 0.10-lot EURUSD position, so $100 of margin is locked and the level starts at 1,000%. A $500 floating loss drops it to 500%; at $980 of floating loss the level reads 20%. When the level touches the broker's stop-out threshold — published in the platform specification, not the marketing — positions are force-closed at the worst possible moment.
Leverage itself does not change the risk of a fixed lot: a 0.04-lot position loses the same $100 on a 25-pip stop at 1:100 or 1:500. What leverage changes is how little margin a huge position requires — it makes oversized lots feel affordable and postpones the margin-level warning until the position is already too big. The leverage number is a margin tool; the risk decision is still taken in the lot size.
Platform access is rarely the constraint: in our review, 23 of 24 brokers document both MT4 and MT5, and the best brokers for automated trading article scores EA permissions, leverage caps and VPS availability broker by broker before you commit.
The six-step risk checklist before go-live
Before a robot touches real money, run six checks in order. Ten minutes here removes months of recovery.
- Read the input list, not the sales page. Identify the sizing model — fixed, percent-based, or recovery logic such as martingale and grid. If the documentation hides what happens after a loss, that silence is the answer.
- Backtest at the vendor's inputs on your own data. Read the maximum drawdown and the longest losing streak from your own report, not from screenshots.
- Convert the drawdown into a position size. Pick your percent risk, apply the formula, and check the projected drawdown stays inside your tolerance. LotSmith automates exactly this step.
- Run the margin math at your leverage. Multiply the cost of the worst streak by three; if that number drifts toward stop-out territory, the sizing is wrong — not the leverage.
- Confirm the EA obeys its inputs on demo. Some robots silently normalize or override lot settings; a two-week demo run exposes it before the account pays for it.
- Fund the minimum you planned and let a trackable record build. Published minimums in our review run from $1 to $200; start there, verify a withdrawal, then scale — never the reverse.
Keeping the risk honest while the robot runs
Risk settings are not set-and-forget. Percent-risk sizing re-sizes automatically as equity moves, but fixed lots drift: after a good month on $1,000, that 0.10 lot is suddenly twice as aggressive relative to balance as it was. Revisit the inputs monthly and recompute after every deposit or withdrawal. What you must never do is raise risk after losses to win it back faster — an account that does that has switched itself to martingale with extra steps.
Monitoring needs uptime: 14 of the 24 brokers in our review provide VPS hosting, and the forex VPS for automated trading guide covers what to look for. Keep a one-line journal of every input change with its reason. And when live behavior diverges from your backtest — deeper drawdown, longer streaks — stop the robot and compare trades one by one; the divergence names its own cause within days.
Frequently Asked Questions
How much should a forex robot risk per trade?
For a percent-risk model, the working range most EA traders stay inside is 0.5–2% of equity per trade, with 1% as the common starting point. Below 0.5% the account barely reacts; above 2%, one ordinary losing streak starts to threaten the stop-out. The right number follows from the drawdown your own backtest showed — size so that at least twice that drawdown still sits inside your tolerance.
Is martingale ever acceptable for an EA?
Martingale can survive for a while — sometimes for years — because most sequences end in the small win it was designed for. The failure is structural, not unlucky: the doubling table above shows the account is gone before the killing streak becomes statistically special. If you insist on testing one, run several years of data with real spreads in the Strategy Tester, and expect the table's shape.
What drawdown is acceptable for a forex robot?
Judge it against the recovery math and your own nerves. A 20% drawdown needs a 25% gain to heal and is workable; a 50% drawdown needs the remaining equity to double and usually marks the psychological end of the strategy regardless of the arithmetic. A robot whose backtest drawdown stays under roughly 25% at your sizing is already rare. Depth and duration both matter — a slow 15% that lasts six months wears people down faster than a fast one.
Fixed lots or percent risk — which is better?
Percent risk wins on every account whose size changes: it compounds up in good periods and shrinks automatically in bad ones — precisely the behavior martingale reverses. Fixed lots remain acceptable for very small accounts and small lots, where the formula's granularity breaks down because many brokers will not open 0.037 lots. If you stay fixed, recheck the lot-to-balance ratio monthly; the ratio is what drifts.
Does higher leverage mean higher risk for an automated strategy?
Only indirectly. For a fixed lot, a 25-pip stop loses the same money at 1:100 as at 1:500; leverage changes the margin posted, not the risk taken. The danger is that high leverage makes huge positions affordable and delays the margin-level warning until the position is already oversized. Treat leverage as a margin tool, set risk through lot sizing, and check the broker's stop-out specification before going live.
Your next step
The order is fixed: measure drawdown in your own backtest, size positions from it, verify the inputs on demo, fund small, then scale — in that order, without skipping. The broker side matters exactly as much: open the mqlicense brokers hub to compare all 24 reviewed brokers on EA permissions, costs, platforms and VPS availability.
If you are configuring rather than building: TradeKeeper MT5 manages positions with risk-first logic, and LotSmith computes risk-based lot sizes for your account and pairs — both licensed originals you can test in the Strategy Tester on your own data before any real deposit. The TradeKeeper MT5 walkthrough covers the setup end to end.
Past performance — from backtests, demos or live accounts — does not guarantee future results. Nothing in this guide is financial advice; verify every condition on the broker's official pages before you deposit.
The same math that guards a live account guards prop firm drawdown rules.