Ready to go further
Check the lot size before the grid does
Enter your balance, risk and stop distance and see the lot size they allow.
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
Key facts
- A grid EA is an Expert Advisor, the kind of program that runs inside a forex trading platform, that opens trades at fixed price steps and closes each one at a small profit target. It is a grid bot for a leveraged currency account.
- Lot size per level is the main risk setting. In a made-up grid of 5 levels, 20 pips apart, 0.10 lot each, a fall of 100 pips under the first fill leaves $306.00 floating (calculated by us on 27 Oct 2026, exact).
- Raising the lot size on each deeper level, from 0.10 to 0.30, takes the same fall to $512.00 and the total position from 0.50 to 1.00 lots.
- Spread is paid at every fill. With a made-up 1.2 pip spread, a 20 pip take-profit on 0.10 lot nets $18.80 instead of $20.00.
- Swap is charged for each night a position is held, and in a grid the positions that are held longest are the ones that are losing.
What a grid EA is
An Expert Advisor is a program that trades by rule inside a forex platform. A grid EA uses the grid idea: open a trade at a start price, open another every fixed number of pips as price moves away, and close each trade when price returns a set distance in its favour. Unlike a spot crypto grid, the trades are on margin, each has a lot size, and each one costs spread and swap.
A pip is the usual smallest quoted move of a currency pair, 0.0001 for most pairs. A lot is a standard contract, 100,000 units of the base currency. Everything below uses a made-up pair, quoted to four decimals, where one pip on one standard lot is worth $10. The pip value calculator and lot size calculator give the same figures for any pair.
The made-up setup
- Account balance $5,000.00, leverage 1:30.
- Start price 1.1000. A new buy every 20 pips down, five buys in all.
- Each buy has a 20 pip take-profit above its own fill.
- Spread 1.2 pips. Swap -$5.00 per standard lot per night on a held buy.
Lot size per level, in numbers
Price falls from 1.1000 to 1.0900, 100 pips. All five levels are open. Each level is losing from its own fill, so the lowest level is only 20 pips under water and the first is 100. The table uses 0.10 lot at every level. The loss on a level is lots times $10 times pips.
| Level | Fill price | Lots | Pips under | Floating loss | Spread paid | Net |
|---|---|---|---|---|---|---|
| 1 | 1.1000 | 0.10 | 100 | -$100.00 | -$1.20 | -$101.20 |
| 2 | 1.0980 | 0.10 | 80 | -$80.00 | -$1.20 | -$81.20 |
| 3 | 1.0960 | 0.10 | 60 | -$60.00 | -$1.20 | -$61.20 |
| 4 | 1.0940 | 0.10 | 40 | -$40.00 | -$1.20 | -$41.20 |
| 5 | 1.0920 | 0.10 | 20 | -$20.00 | -$1.20 | -$21.20 |
Together that is 0.50 lots and $306.00 down, about 6.1 percent of the $5,000.00 balance. The margin held on 0.50 lot at 1:30 and a price of 1.0900 is $1,816.67, so the margin level (equity divided by margin) is 258 percent. Each take-profit that does close brings in $18.80 after spread. It takes 17 such closes to repay this one fall. The margin call page explains what a platform does when that percent gets too low, and the level varies by broker, so read yours.
Flat lots against growing lots
Many grid EAs offer a lot multiplier: each deeper level is bigger, so a small bounce closes the whole stack. This is the martingale idea. The second row below uses 0.10, 0.15, 0.20, 0.25 and 0.30 lot for the five levels, and the same 100 pip fall.
| Lot sizes | Total lots | Floating result | Margin used | Equity | Margin level | Swap per night |
|---|---|---|---|---|---|---|
| Flat: 0.10 at every level | 0.50 | -$306.00 | $1,816.67 | $4,694.00 | 258% | -$2.50 |
| Growing: 0.10 to 0.30 | 1.00 | -$512.00 | $3,633.33 | $4,488.00 | 124% | -$5.00 |
The growing grid is down $512.00 against $306.00, and its margin level is 124 percent against 258 percent. The bigger bottom levels give it a faster recovery on a bounce and a faster ruin on a continued fall. Calculated by us on 27 Oct 2026, exact. The floating results include the spread paid, the margin uses the price now, and swap is shown per night, not added to the result.
What spread and swap do to a grid
Spread is the gap between the buy and sell price. A buy opens at the higher price, so a trade starts a spread behind. In the example, 1.2 pips on 0.10 lot is $1.20 per trade, and a 20 pip target is worth $20.00, so spread takes 6 percent of every closed level. Narrow the step to 10 pips and the same spread takes 12 percent. Spread also widens in thin or fast markets, which is when a grid is busiest. See spread.
Swap is a charge or credit for holding a position past the daily rollover, set by the interest rate gap between the two currencies and by the broker. In the made-up example every held buy pays -$5.00 per lot each night, so the flat grid pays -$2.50 a night and the growing one -$5.00. Swap can be positive for one side of a pair and negative for the other, and it can change, so the number on your account is the only one that counts.
Checking a grid EA
- Ask for the largest number of open levels and the lowest margin level the test ever reached, not only the end balance.
- Check that the test used real spread and swap for the period, not zero. See backtesting for the traps.
- Look at what it does at the last level: stop, hold, or keep opening trades.
- Run it on a demo account first and compare against the test. See forward testing.
Nothing on this page is a result from an EA. The pair, the prices, the spread and the swap are all made up.
Keep Going
Related Tools and Guides
Keep exploring
FAQ
Frequently Asked Questions
What is a grid EA?
An Expert Advisor that opens trades at fixed pip steps as price moves away from a start price, and closes each at a small target. It is the grid method run on a margin forex account.
How is lot size set in a grid EA?
Either the same lot at every level, or a larger lot at each deeper level through a multiplier or a list. Larger deeper lots speed up recovery and speed up the loss if price keeps going.
What does swap do to a grid EA?
A held trade is charged or credited at each daily rollover. The charge depends on the pair, the direction and the broker, and in a grid the longest-held trades are the ones that are losing.
Why does spread matter more on a tight grid?
Spread is a fixed cost per trade. The smaller the take-profit, the bigger the share of it that spread takes. In the example it is 6 percent of a 20 pip target and 12 percent of a 10 pip one.
Can a grid EA cause a margin call?
Yes. Each level adds margin, and the floating loss lowers equity, so the margin level falls together from both sides. The exact point where a platform acts varies by broker.
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 EA works. All prices and costs 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