Skip to content
← All posts

Grid and Martingale EAs

Grid EA Risk: How to Limit Drawdown When Running One

EABuild Team · · 9 min read

Grid EA Risk: How to Limit Drawdown When Running One – EABuild

Grid EA risk comes from one habit: the EA keeps adding orders while price moves against the first one, so open exposure and drawdown (the drop from an account's peak balance) grow with every step. You cannot remove that risk, but you can set limits around it before the EA ever trades live. This post walks through five limits in the order you set them: maximum open orders, lot step, an equity stop, account size and a demo test.

How a grid EA builds exposure, and what you can control

A grid strategy is one that opens extra orders at set price steps. Many grid EAs also use martingale, which means increasing the lot size (the trade volume) after a losing trade. The EA treats its open orders as one basket and closes the basket once price returns to a target level. If price keeps going the wrong way, the basket keeps growing.

Four things decide how large that basket can become, and all four are yours to check:

  • how many orders the EA may hold at once;
  • how the lot size changes from one order to the next;
  • the point at which you stop the whole basket;
  • how much capital sits behind it.

Each step below covers one of them. If you want the mechanics in more depth first, the grid martingale EA guide explains how averaging baskets work, and the post on grid vs martingale EA logic separates the two ideas.

What to have ready before setting grid EA limits

Limits are only useful if you know the numbers you are limiting. Gather these items first.

  • The listing's facts: the strategy line, the symbols and timeframe, and the recommended minimum deposit. Treat the deposit as a starting reference, not as a risk limit.
  • The inputs window: open the EA's inputs in MetaTrader and read every input before you change any. Names differ between products, so look for the lot size, any multiplier or step, the grid distance, a cap on orders and any stop level.
  • A demo account: a practice account with virtual funds, on the same platform and with a similar account type to the one you plan to use.
  • A notebook or sheet: you will record the number of open orders, total lots and floating loss.

If an input does not appear in the listing and you cannot find it in the inputs window, treat it as unknown. A missing limit is not a limit that is switched on.

Five steps to put limits around a grid EA

  1. Find the maximum number of open orders and set it to a figure your account can carry.
  2. Read the lot size and the lot step, and work out total lots at the last order.
  3. Decide an equity stop level and how it will be enforced.
  4. Match the account size and the margin to the worst basket you allow.
  5. Run the whole set-up on a demo account through a trending period.

The next sections take these in turn.

Step 1: cap the open orders

The number of orders is the first limit because it fixes the longest run the grid can make. A grid with a 20-pip step and a cap of ten orders can add exposure over roughly 180 pips of adverse move. After that it stops adding. A grid with no cap keeps adding for as long as margin allows, and when margin ends the broker decides for you.

Look in the inputs for something like a maximum number of trades or levels. Start with a low cap and raise it only when you have seen what the basket looks like at that size. If the EA has no such input, you cannot rely on it to stop adding, so you have to limit the account instead (steps 3 and 4).

Step 2: check the lot step

The lot step is how much bigger each new order is than the last. It can be zero (every order the same), a fixed amount added each time, or a multiplier. The choice changes the total faster than most readers expect. The table below uses invented numbers for a EURUSD grid on a USD account, with a 20-pip step, a first order of 0.01 lots and ten orders open. It assumes about $10 per pip for one standard lot and ignores spread and swap.

Lot stepTotal lots with 10 orders openFloating loss when price is 180 pips below the first order
Fixed 0.01 at every order0.10about $90
Add 0.01 per order (0.01, 0.02, 0.03 and so on)0.55about $330
Multiplier of 2 (0.01, 0.02, 0.04 and so on)10.23about $2,026

The grid and the number of orders are the same in all three rows. Only the lot step differs, and the floating loss differs by more than twenty times between the first and last row. This is why a multiplier deserves the most careful reading. If you can choose, a smaller multiplier or a fixed lot gives you a basket that grows more slowly.

Every open lot also needs margin (the deposit the broker holds against open positions). The 10.23-lot basket above would need far more margin than the 0.10-lot one, at the moment the account is losing money.

A listing can help here. Quantum King EA for MT5 is designed for AUDCAD on M5, and its strategy line reads grid, martingale and hedging. The download is one EA file and 6 set files (saved lists of input settings you load in MetaTrader). Six starting configurations means six sets of lot and step values to read against this step before you load any of them. Hedging means holding buy and sell positions on the same symbol at once, so check that your broker and account type allow it.

Step 3: set an equity stop

Equity is balance plus the floating result of open orders. An equity stop is a rule that closes the basket, or switches the EA off, when equity falls to a level you chose. It limits the loss you accept from one bad run, instead of leaving it to margin.

Some EAs include a stop or drawdown input. Where the inputs window shows one, read what it measures: percent of balance, percent of equity or a money amount. Where it does not, you can still apply a rule by hand or with a tool of your own, such as an alert on your platform and a decision made in advance. Write the number down before you start: for example, how much of the account you will let one basket lose. The post on daily drawdown limits shows how balance-based and equity-based limits differ, which matters if you trade a prop firm account.

A stop is not a promise that the loss stays at that number. Price can jump past your level, and spreads can widen. Treat the stop as a plan that reduces the size of a bad outcome, not as a guarantee.

Step 4: match the account size to the basket

Work backwards from the largest basket you allowed in steps 1 and 2. Take the floating loss at the last order and ask whether your account could carry it and still leave margin. If the answer is no, the fix is to lower the lot, lower the cap or use a larger account. It is not to hope price will return in time.

A recommended minimum deposit in a listing tells you what the listing considers a starting reference for that product. It does not tell you what loss you can accept. Your own lot size decides how much room there is. A small lot on a larger account leaves more room than the minimum deposit with a lot that looks attractive.

Check also your account's leverage and margin call rules with your broker, because they decide when positions are closed.

A low minimum deposit shows why this step matters. EuroStable EA for MT4 is designed for EURUSD on M15, with grid, martingale and scalping in its strategy line, and the listing lists a $100 minimum deposit. An account near that size leaves little margin for a growing basket, which is a reason to keep the order cap and the lot step small and to test with care.

Step 5: test the limits on demo

Run the EA with your limits on a demo account for several weeks, and include a period when price trends. Note the largest number of open orders, the largest total lots, the deepest floating loss and the lowest margin level you saw. Compare these with the figures you worked out on paper. If the basket got larger than expected, tighten a limit before going near a live account.

A demo account fills orders without full real-market friction, so live spread and slippage can differ. The post on demo vs live account testing covers what carries over and what does not.

The account type matters most when scalping is part of the strategy. SharpShooter EA for MT4 combines grid with scalping and trend following on EURUSD and GBPUSD, on M15 and M30, and needs MetaTrader 4 build 1476 or later. Spread and execution matter alongside the basket limits, so test it on the account type you plan to use.

Common mistakes when limiting a grid EA

  • Raising the lot to recover. Increasing size after a loss adds to the very thing you are trying to limit.
  • Running several grids on one account. Each basket may look acceptable alone, but their drawdowns can arrive together, especially on related pairs.
  • Treating the minimum deposit as the plan. It is a reference from the listing, not your loss limit.
  • Changing limits during a drawdown. Widening the cap or removing a stop while a basket is open usually makes the position larger when it is least affordable. Decide the limits before you start.
  • Judging by a calm stretch. A grid can run quietly for a long time and still carry one large loss. Judge the set-up by the largest basket it can build, not by how calm the recent weeks were.

Testing your grid limits on a demo account this week

A practical plan for the coming week: choose one of the grid EAs named above, load one set file on a demo account, and write down your cap, lot step and equity stop before you press start. Then check the numbers each day. Every product in the shop is a digital download and is included in the membership, so you can read the settings of several grid EAs before choosing one. Check the settings before you trade live.

Trading foreign exchange and CFDs carries a high level of risk and may not be suitable for all investors. Past performance does not guarantee future results; only trade with money you can afford to lose.

Tags: Grid and Martingale EAs, Risk Management, Expert Advisors

← All posts

Get every EA with membership

313 products · from $16.59/month

See plans

More in Grid and Martingale EAs