Home › Guides › Martingale Bot

BOT TYPE GUIDEFREENO ACCOUNTAUTOMATED TRADE BOTSMartingale BotHow it works and where it breaksEDUCATION ONLY | NO SIGNALSEXAMPLE NUMBERS ARE LABELLEDAUTOMATED TRADE BOTSautomatedtradebots.com
A free page on martingale bot. Education only, with example numbers labelled.
BOT TYPE GUIDE

Martingale Bot

Short answer

A martingale bot opens a trade, and if that trade is stopped out it opens the next one larger, usually double, so the first win repays every earlier loss plus one starting unit.

The bot form of the doubling idea. See the loss ladder step by step, what a step cap really limits and where margin runs out first.

The page explains how this kind of bot works, works through the arithmetic of its ladder or grid with tables, shows where it breaks, and gives you a fair way to test one before you risk money.

  • How the bot works, step by step
  • The arithmetic of the ladder or grid
  • Where it breaks and how to test it honestly
  • No advice, no signals, no profit promises

Last reviewed 28 October 2026. Education only, not advice.

Free, no account Runs in your browser Worked numbers shown Not advice Examples labelled

Ready to go further

Put your own ladder through the numbers

Set a start lot, a multiplier and a stop distance and see the step where margin runs out.

Reading time5 minutes
Worked exampleExact arithmetic
Tools linked2 on this page
Reviewed28 Oct 2026

What is included

  • How the bot works, step by step
  • The arithmetic of the ladder or grid, with tables
  • How it fails and how to test it honestly
  • The tools that check the numbers

Who it is for

  • People thinking of using this kind of bot
  • People already running one and wanting a stress test
  • Readers comparing bot types before buying
  • Not advice, and not a recommendation to use one
Lot size at each step of a made-up martingale bot (start 0.01, doubling)0.01Step 1$3.00 lost0.02Step 2$9.00 lost0.04Step 3$21.00 lost0.08Step 4$45.00 lost0.16Step 5$93.00 lost0.32Step 6$189.00 lost0.64Step 7$381.00 lost1.28Step 8$765.00 lostOrange: margin for that step is more than the equity left on a $1,000.00 account. Calculated by us on 27 Oct 2026, exact.
The picture for this page. Example numbers are made up unless the page says they were calculated.

Key facts

  • A martingale bot opens a trade, and if that trade is stopped out it opens the next one larger, usually double, so the first win repays every earlier loss plus one starting unit.
  • The bot form needs two settings the idea does not: a step cap (the most losing steps in a row it will take) and a lot limit. Both decide how it fails.
  • In a made-up ladder starting at 0.01 lot with a 30 pip stop and a 30 pip target, every win nets $3.00, but five losses in a row cost $93.00, the same as 31 wins (calculated by us on 27 Oct 2026, exact).
  • On a $1,000.00 account the margin wall arrives at step 6, where the lot size needs more margin than the equity left (made-up leverage 1:30).
  • A step cap does not remove the loss. It sets the size of it and turns a slow drain into one large event.

What a martingale bot is

The martingale page explains the idea: after a loss, bet more, so one win clears the slate. A martingale bot is a program that does this on its own. It has a starting lot, a multiplier (2 for doubling), a stop and a target for each trade, and a rule for what happens when a trade is stopped out: open the next one at the multiplied size. When a trade hits its target, the cycle ends and the bot goes back to the starting lot.

The martingale strategy page covers the method. This page covers what a bot adds. A person can stop. A bot with no cap does not. So the step cap and the lot limit are the settings to look at first.

The loss ladder

The made-up bot starts at 0.01 lot and doubles after each stop-out. The stop and the target are each 30 pips, and one pip on one standard lot is worth $10, so 0.01 lot is worth $0.10 a pip and the first stop costs $3.00. The account is $1,000.00 at 1:30 leverage and a price of 1.09, so margin is about $3,633.33 per standard lot. Each row shows what happens if every step up to it is stopped out.

StepLot sizeLoss on this stepTotal lost so farWin on this stepNet if it winsMargin for this stepEquity before itMargin covered
10.01$3.00$3.00$3.00$3.00$36.33$1,000.00Yes
20.02$6.00$9.00$6.00$3.00$72.67$997.00Yes
30.04$12.00$21.00$12.00$3.00$145.33$991.00Yes
40.08$24.00$45.00$24.00$3.00$290.67$979.00Yes
50.16$48.00$93.00$48.00$3.00$581.33$955.00Yes
60.32$96.00$189.00$96.00$3.00$1,162.67$907.00No
70.64$192.00$381.00$192.00$3.00$2,325.33$811.00No
81.28$384.00$765.00$384.00$3.00$4,650.67$619.00No
92.56$768.00$1,533.00$768.00$3.00$9,301.33$235.00No
105.12$1,536.00$3,069.00$1,536.00$3.00$18,602.67-$533.00No

Read the "Net if it wins" column first. It is $3.00 in every row where the previous steps were stopped. That is the design: a long ladder with a tiny reward. Now read "Total lost so far". Step 5 has cost $93.00, step 8 has cost $765.00 and by step 9 the losses are more than the $1,000.00 account. The last two columns show the margin wall: from step 6 the next lot needs more margin than the account has left, so the platform cannot open it, whatever the bot wants. The exact margin rule varies by broker. The martingale calculator runs your own numbers.

Step caps and the margin wall

A step cap says the bot will take at most this many losing steps in a row. At the cap it stops the cycle, takes the stack of losses and starts again, or stops altogether. A cap of 5 in this example limits one cycle to $93.00, which is 9.3 percent of the account. A cap of 8 limits it to $765.00, 76.5 percent, and a $1,000.00 account cannot open step 6 at all.

The cap is a trade between two failures. A low cap is reached more often. Assume each step has a 50 percent chance, an assumption only, since real moves cluster. Then a cycle ends at the cap with a chance of 0.5 to the power 5, which is 3.125 percent, about 1 in 32. Each cycle that does not reach the cap wins $3.00. The average per cycle is then 0.96875 times $3.00 less 0.03125 times $93.00, which is zero. The wins and the rare loss cancel out exactly, before spread. Spread and swap push it below zero. The expected value calculator does this sum for any win rate.

The margin wall is the other limit. It is not a choice. When the next lot needs more margin than the free equity, the order is rejected, and the bot is stuck holding a loss it planned to recover. If the account is in trouble at that point, the platform can close positions, as described on margin call and stop out.

Cumulative loss as each step is stopped out, against a 1,000 account (made-up)05001,00012345678910Account 1,000$381.00Steps stopped out in a row (line cut off at 1,400)Made-up example. Spread and swap are not included, so real figures are worse.
The loss doubles with each step. The red line is the whole account, and the total loss passes it at step 9. The line is cut off at 1,400 after that.

Why a bot hides the problem in testing

  • Most cycles win. With a cap of 5, 96.9 percent of cycles in the example end with a gain of $3.00. A test that runs for a few weeks can show a smooth rising line and never meet the one cycle that ends at the cap.
  • Trends make streaks. The coin-flip chance above is the best case. In a real trend, stops are hit one after another, and the streak is longer than chance suggests.
  • Costs scale with size. Spread is paid on every step, and the late steps are the large ones.
  • A test that ignores the margin wall overstates what the account can take. Check that the test included margin rejections.

How to check a martingale bot

  • Find the step cap, the multiplier and the lot limit. If any is missing, the worst case is unlimited.
  • Work out the loss at the cap as a percent of the account, as in the table.
  • Look for the largest losing run in the test and the lowest margin level, and ask how long the test was.
  • Compare with the blow-up tracker to see how often this kind of ladder has ended.

Every number here is made up. We have no tested results of our own for a martingale bot to publish yet.

FAQ

Frequently Asked Questions

What is a martingale bot?

A bot that opens a larger trade after each loss, usually double, so that the first winner repays all earlier losses and one starting unit. It returns to the starting size after a win.

What is a step cap?

The most losing steps in a row the bot will take. At the cap it stops the ladder and accepts the stack of losses. It sets the size of the worst cycle.

What is the margin wall?

The step where the next lot needs more margin than the account has free. The platform rejects the order and the bot is left holding the loss it meant to recover.

Why does a martingale bot look good in a backtest?

Most cycles end in a small gain, and the rare cap event may not appear in a short test. The smooth line hides the size of the loss it will take when the event comes.

Does a lower multiplier help?

A smaller multiplier grows the stack more slowly and needs more steps to recover, so the ladder is longer. The shape of the risk is the same: small gains often, a large loss rarely.

Are the numbers on this page real?

Example numbers are made up to show how the maths works, and the page says so. A figure only counts as exact when the page says it was calculated on a stated date. Nothing you enter in a calculator leaves your browser.

Can I use this to decide whether to run a bot?

It can show whether a bot's numbers hold together and how much an account can lose. It cannot say what the market will do, and it is not advice. Use it to ask better questions, then read the terms of your own broker or exchange.

Is this financial advice?

No. It is general education about how a type of bot works. All prices and sizes are made up, and it does not consider your situation.

Know the Risk Before You Run It

Free calculators and guides, added every week. Leave your details and we will email you when new ones go up.

Trading carries a risk of loss