Skip to content
AlgoVerdict
Menu

Risk & testing · As of 22 Nov 2026

Basket grid explained: how a basket-grid EA works and what can go wrong

A basket grid adds orders at set steps and closes them all together beyond the average price. How the mechanics work, and where these systems break down.

AlgoVerdict editorial team, responsible: Pitt PetruschkeUpdated

On this page

In short

A basket grid opens a position and adds more while price moves against it. All positions in one direction form a basket with a shared average price. When price comes back a little, the whole basket closes in profit, even though the first position on its own would still be under water. That works while the market swings back and forth. It breaks on a move that keeps going without a pullback: the basket grows, the floating loss grows faster, and without a limit it ends with a stop out.

This page walks through the building blocks, works through an example and shows how to check such an EA. The general risk page for both system types is our guide grid and martingale EAs: the risks; the short version with an animation is grid trading explained simply.

Schematic of a basket grid: after the first buy order price keeps falling, further buys are added at fixed steps, the basket’s average price falls with them and the common basket target sits just above it. The basket stop lies below. Price turns and reaches the basket target, all positions close together. Dashed in red, the alternative: price keeps falling to the basket stop and the whole basket closes at a loss.Basket grid: added orders, average price, basket target12345Target hit:all closedbasket stop: whole basket closed at a lossBasket stop (if set): closes the whole basket at a lossBuyAvg.TargetStep per level: fixed or growing (setting)Schematic · no price data
Basket grid: added orders pull the average price along, the basket target follows. If price runs to the basket stop, the whole basket closes at a loss. Schematic, no price data.

Five building blocks of a basket

1. The start signal. Something has to trigger the first order: a move outside a band, a stretch beyond the previous day, a new candle in one direction. The signal decides how often a basket starts but says little about the risk. That lives in the next four blocks.

2. The step between levels. Fixed (say, always 20 pips) or growing (each step wider than the last by a factor). Growing steps cover a longer distance with the same number of orders, but they pull the average price towards the market more slowly.

3. The lot rule. This has the biggest say in the risk:

Bar schematic of the lot size per grid level for three lot rules: constant, growing linearly and martingale with a factor. With martingale the bars grow fastest.Lot size per level: three rulesconstant12345678linear12345678martingale ×1.512345678Level 1–8 · bar height = lot per order, same scaleWorked example
Lot rule per level as a worked example (start lot = 1 unit): constant, linear (+1 unit every three orders) and martingale (factor 1.5). No results.
  • Constant: every order has the same size. With equal steps the average sits in the middle of the filled distance.
  • Linear: lots grow by a fixed amount, for example one start lot every few orders.
  • Martingale: each order is larger than the previous one by a factor. The average closes in on price quickly and the volume explodes. With eight orders at factor 1.5 the eighth is about seventeen times the first.

4. The exit. Usually a shared basket target a few pips beyond the average price, often with one trailing stop for all positions. Some systems shrink the basket along the way: the best order closes together with part of the worst once both are in profit combined, so the basket gets smaller from both ends.

5. The limit. A basket stop (loss of all positions combined), an equity stop (loss of the whole account), a maximum number of orders or a block on new baskets. With no limit at all, the broker decides when it ends: by stop out.

Worked example: how far does price have to come back?

A buy basket, levels every 20 pips, equal lots. After five orders price is 80 pips below the first. The average sits in the middle, 40 pips above the last entry. With a basket target of 10 pips, price has to climb 50 pips for the basket to close; that is more than 60 % of the way it fell.

With martingale lots (factor 1.5) the average after the same five orders is much lower, just under 25 pips above the last entry. The basket closes sooner. In exchange the open volume is more than two and a half times as large, and every further pip against the basket costs that much more. This trade-off is what makes martingale so tempting: frequent quick closes against a risk that, in rare phases, costs everything at once. Our martingale and grid calculator lets you play with step, factor and number of levels yourself.

What can go wrong

  • A trend that does not pull back. The central risk. Each new level raises the loss per pip until the margin runs out.
  • The basket stop hits. It caps the damage but makes it final. A system with a basket stop has real losing days; one without usually has them later and larger.
  • Swap over several days. Baskets often stay open for days. With a large volume and an unfavourable swap, waiting gets expensive, especially across the triple-swap day.
  • Correlation. If baskets run on several pairs sharing a currency, a single strong move can hit all of them at once.
  • The cost of many small orders. Spread and commission are paid at every level. With tight basket targets that eats a large share of the profit.
  • The broker's minimum lot. If the minimum lot is above the EA's start lot, the EA may trade a multiple of the planned volume. Check the minimum lot and lot step of your symbol.
  • Terminal offline. Basket targets, trailing stops and basket stops often exist only inside the EA, not at the broker. If the terminal stops, none of them protect you; a VPS is a must.
  • A short test window. A backtest over a few months without a big trend shows a smooth curve and hides the very case the limit is there for. More on that in backtesting and forward testing.

How to check a basket-grid EA

  1. Read the lot rule: constant, linear or with a factor? With a factor above 1 it is a martingale, whatever the product page calls it.
  2. Look for the limit: is there a basket or equity stop, and is it switched on in the supplied settings?
  3. Work out the largest basket: maximum orders times the lot rule. How much margin does a full basket need, and what does one pip cost then?
  4. Stress test in the Strategy Tester: pick a period with a long trend in the traded pair, not only the quiet months.
  5. Read the live evidence: for grid EAs the worst drawdown figure matters, not the return. How we rate third-party EAs is set out in our methodology; our EA reviews flag grid and martingale explicitly, and the guide on gold EAs with grid, martingale and stop-loss shows it on one market.

Bottom line

A basket grid trades many small gains for one rare, large risk. That can be a deliberate choice, but only with a fixed limit, enough capital for the full basket and a test that contains a real trend. The key number of a grid EA is not its win rate but what the largest possible basket costs.

Past results are no guarantee of future ones, and trading leveraged products can lead to the loss of the capital invested.

Want more tests like this?

The digest arrives on Sundays with new and updated tests based on real accounts. Only when there is news, unsubscribe anytime. About the digest

By subscribing you agree to receive the digest by email. You confirm via a link (double opt-in) and can unsubscribe anytime via the link in every email. Details in the privacy policy.

Frequently asked questions

What is a basket grid?

A grid system that runs all positions in one direction as a single basket. If price moves against the first position, more are added at fixed or growing steps. The basket has one average price and closes as a whole once price is a little above it (buys) or below it (sells).

Is a basket grid the same as martingale?

No, but it can contain one. Martingale describes the lot rule: each new order is larger than the previous one by a factor. A basket grid can use constant, linearly growing or martingale lots. The faster the lots grow, the closer the average price gets to the market and the faster the risk grows.

What is a basket stop?

A loss limit for the whole basket instead of a stop-loss on each position. When the floating loss of all positions together reaches the set amount, the EA closes the entire basket. That turns an open-ended risk into a roughly known loss (slippage and gaps can exceed it), at the cost of baskets that would still have recovered.

Why does a grid often look so good in a backtest?

Because almost every basket comes back at some point and closes at a small profit. The equity curve rises smoothly until a trend arrives that does not pull back. If no such phase is in the test window, the backtest does not show the real risk at all.

Does a basket grid need a hedging account?

Usually, yes. Many systems run a buy and a sell basket at the same time or close single positions selectively. A netting account holds one net position per symbol, so many basket grids do not run there or only in a reduced mode.