Home / Blog / How much deposit does a grid bot need? The arithmetic of…

How much deposit does a grid bot need? The arithmetic of exposure and margin

In short: A grid bot needs a deposit that covers the margin for every order it can open and the floating loss on the way down. For a doubling ladder the volume is the first order × (2^N − 1) in coins; the margin is the cost of all those orders divided by leverage, and that cost is less than the first order's value × (2^N − 1), because the lower orders are cheaper (here $8,591 rather than $10,230).

Grid bot deposit: 2ᴺ − 1 Doubling ladder volume = first order × (2ᴺ − 1); margin and drawdown set the deposit
2ᴺ − 1 Doubling ladder volume = first order × (2ᴺ − 1); margin and drawdown set the deposit

This applies to grid bots and martingale or DCA-style bots on exchanges and platforms such as Binance, Bybit, OKX, 3Commas, Veles and Pionex, and to grid expert advisors on MT4 and MT5. The inputs below are round made-up numbers, not a forecast and not advice.

On this page (7)

How much deposit does a grid bot need?

A grid bot's deposit has to cover the margin for every order it can open, the loss that builds as they fill, and a buffer for fees and slippage. The formulas, with q the first order, m the multiplier, N the number of orders and L the leverage:

  • Total volume: Q = q × (m^N − 1) / (m − 1). With m = 1 this is N × q; with m = 2 it is q × (2^N − 1).
  • Position value: the sum of each order's size × its price.
  • Margin to hold every order: position value / L.
  • Average entry: position value / Q.
  • Price where the deposit is gone (cross margin, simplified, every order filled): average entry − deposit / Q. This holds when the result is at or below the last order's price; in the example below that means a deposit of at least $202.6, the loss when the last order fills.

Fees, funding and the maintenance margin are not in these formulas, so a real liquidation comes earlier.

Worked example: a 10-order doubling ladder

Take a long ladder: price 100, ten orders every 2 (100, 98 … 82), first order 0.1 coin, each next order twice the last. Exchange bots usually size in USDT, which changes the coin counts slightly but not the doubling.

OrderPriceSize (coins)Cost ($)
11000.110.0
2980.219.6
3960.438.4
4940.875.2
5921.6147.2
6903.2288.0
7886.4563.2
88612.81,100.8
98425.62,150.4
108251.24,198.4
Total102.38,591.2

Total volume: 0.1 × (2^10 − 1) = 0.1 × 1,023 = 102.3 coins. Average entry: 8,591.2 / 102.3 = 83.98. The last order alone is half of the volume (51.2 / 102.3 = 50%). When it fills at 82 the floating loss is 102.3 × (83.98 − 82) = $202.6, and each further $1 down costs another $102.3.

A first order worth $10 therefore needs about $8,591 to place every order with no leverage. At 10× leverage the margin is $859.

Deposit against survivable fall: what does the table say?

For this ladder, $1,000 needs about 10.8× leverage to place all ten orders and is gone at 74.2 (−25.8%); $5,000 needs about 1.8× and lasts to 35.1.

DepositLeverage at which the margin of all 10 orders equals the deposit (before the floating loss)Leverage the exchange needs to place the 10th order (with the $202.6 floating loss)Price where the deposit is goneFall from the first orderRoom below the last order (82)
$1,0008.6×10.8×74.2−25.8%7.8
$2,0004.3×4.8×64.4−35.6%17.6
$5,0001.7×1.8×35.1−64.9%46.9
$8,600 or more1× (no leverage)1× on spot; futures at 1× need $8,794not reached (it would be below zero)not reachedworst case: lose the $8,591 spent

The second column only shows where the margin of the orders equals the deposit. When the 10th order is placed at 82, the first nine are already $202.6 down, and the exchange checks the new order's margin against what is left, so the leverage it needs is 8,591 / (deposit − 202.6), the third column.

The pattern: a bigger deposit buys distance, and no deposit short of the full cost of the ladder makes it unbreakable. Distance is measured against the loss, not the margin: deposit needed to survive a fall to price P = 102.3 × (83.98 − P). To survive a fall to 70 that is 102.3 × 13.98 = $1,430. At 8,591 / 1,430 = 6× leverage the margin would equal that deposit, but placing the 10th order with the $202.6 floating loss takes about 8,591 / (1,430 − 202.6) = 7×.

How do you size the first order for a given deposit?

Work backwards from the fall you want to survive: set the loss at that price equal to the deposit and solve for the first order. For ten orders, a multiplier of 2 and a linear step s, a fall X below the first order (X of at least 9 steps) loses q × (1,023 × X − 8,194 × s).

Example: $1,000, step 2, survive a fall to 70 (X = 30). q = 1,000 / (1,023 × 30 − 8,194 × 2) = 1,000 / (30,690 − 16,388) = 1,000 / 14,302 = 0.07 coin. Check: 0.07 × 14,302 = $1,001. Placing all ten orders then costs 8,591 × 0.7 = $6,014, which is 6 times the deposit; on futures the 10th order also has to carry the $142 floating loss of the first nine (202.6 × 0.7), so the leverage must be about 6,014 / (1,000 − 142) = 7×. Without leverage the first order shrinks to about $1.16 (the deposit divided by 859) and the ladder stays fully paid.

What else uses up the deposit?

  • Fees, funding and spread on every fill, more orders meaning more of them.
  • Slippage and gaps, when several levels fill at once.
  • Maintenance margin: the venue closes the position before the loss equals the whole deposit.
  • A reserve so the bot is not closed out by a single wick.

This is arithmetic of the settings, not a forecast. Trading with leverage carries risk: if the deposit is too small, a stop-out is possible. Size your deposit with a safety margin. Nothing here is individual investment advice.

Check your own numbers

Related: is grid trading safe, the arithmetic of martingale blow-up, margin call vs stop-out.

FAQ

How much money do I need to start a grid bot?

Enough to fund every order it can open and to carry the loss you are prepared to see. For equal orders the cost is about N × order value. With a multiplier the volume is the first order × (m^N − 1) / (m − 1) in coins; in money it is less, because the lower orders are cheaper (in the example $8,591 rather than $10 × 1,023 = $10,230). Divide the cost by leverage for margin, then add the loss at the fall you want to survive.

Can I run a grid bot with $100?

Only with small settings. The 10-order doubling ladder above, fully paid, would need a first order of about $0.12 for $100 (100 / 859), which you should compare with the minimum order value of your exchange. Equal orders, fewer levels or a smaller multiplier fit a small deposit better.

Does leverage reduce the deposit I need?

It reduces the margin per order, not the loss. The same position loses the same dollars per price move, and with less of your money behind it the deposit runs out sooner: $1,000, which needs about 10.8× to place all ten orders, is gone at 74.2, while $8,591 with no leverage cannot be closed out above zero.

What deposit is safe for a martingale or DCA bot?

No deposit is safe by itself; the table shows distance, not safety. The useful number is the fall you can survive: deposit divided by total volume, subtracted from the average entry. Ask whether that price is below any move you consider possible.

How many orders should a grid have?

Each extra order adds one step of range and, with m = 2, doubles the volume to fund: going from 10 to 11 orders turns 1,023 into 2,047 times the first order, so the deposit for the same first order roughly doubles: the orders cost $16,783 instead of $8,591.

How do I work out the deposit for a gold grid EA on MT5?

Use lots and contract size instead of coins: the loss per $1 of price is lots × contract size, and on a cent account the contract size is set by the broker, so read the symbol specification. The gold grid calculator does the arithmetic, including the margin and the stop-out level you enter.